{"action":"created","comment":{"url":"https://api.github.com/repos/influxdb/influxdb-java/pulls/comments/38884544","id":38884544,"diff_hunk":"@@ -126,13 +137,16 @@ public static Builder builder(final InfluxDB influxDB) {\n \t}\n \n \tBatchProcessor(final InfluxDBImpl influxDB, final int actions, final TimeUnit flushIntervalUnit,\n-\t\t\tfinal int flushInterval) {\n+\t\t\tfinal int flushInterval, final ThreadFactory threadFactory) {\n \t\tsuper();\n \t\tthis.influxDB = influxDB;\n \t\tthis.actions = actions;\n \t\tthis.flushIntervalUnit = flushIntervalUnit;\n \t\tthis.flushInterval = flushInterval;\n \n+\t\tScheduledThreadPoolExecutor service= (ScheduledThreadPoolExecutor) Executors.newScheduledThreadPool(1, threadFactory);","path":"src/main/java/org/influxdb/impl/BatchProcessor.java","position":69,"original_position":73,"commit_id":"980f55c45643d82caa5dc606cffddfafb834ac26","original_commit_id":"c9e9c55d378e03607441f4af0f4ceace188b98bd","user":{"login":"marsishandsome","id":5574887,"avatar_url":"https://avatars.githubusercontent.com/u/5574887?v=3","gravatar_id":"","url":"https://api.github.com/users/marsishandsome","html_url":"https://github.com/marsishandsome","followers_url":"https://api.github.com/users/marsishandsome/followers","following_url":"https://api.github.com/users/marsishandsome/following{/other_user}","gists_url":"https://api.github.com/users/marsishandsome/gists{/gist_id}","starred_url":"https://api.github.com/users/marsishandsome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marsishandsome/subscriptions","organizations_url":"https://api.github.com/users/marsishandsome/orgs","repos_url":"https://api.github.com/users/marsishandsome/repos","events_url":"https://api.github.com/users/marsishandsome/events{/privacy}","received_events_url":"https://api.github.com/users/marsishandsome/received_events","type":"User","site_admin":false},"body":"Yes, I thinks it's necessary.","created_at":"2015-09-08T01:26:56Z","updated_at":"2015-09-08T01:26:56Z","html_url":"https://github.com/influxdb/influxdb-java/pull/79#discussion_r38884544","pull_request_url":"https://api.github.com/repos/influxdb/influxdb-java/pulls/79","_links":{"self":{"href":"https://api.github.com/repos/influxdb/influxdb-java/pulls/comments/38884544"},"html":{"href":"https://github.com/influxdb/influxdb-java/pull/79#discussion_r38884544"},"pull_request":{"href":"https://api.github.com/repos/influxdb/influxdb-java/pulls/79"}}},"pull_request":{"url":"https://api.github.com/repos/influxdb/influxdb-java/pulls/79","id":43018847,"html_url":"https://github.com/influxdb/influxdb-java/pull/79","diff_url":"https://github.com/influxdb/influxdb-java/pull/79.diff","patch_url":"https://github.com/influxdb/influxdb-java/pull/79.patch","issue_url":"https://api.github.com/repos/influxdb/influxdb-java/issues/79","number":79,"state":"open","locked":false,"title":"allow user to provide ThreadFactory for BatchProcessor","user":{"login":"marsishandsome","id":5574887,"avatar_url":"https://avatars.githubusercontent.com/u/5574887?v=3","gravatar_id":"","url":"https://api.github.com/users/marsishandsome","html_url":"https://github.com/marsishandsome","followers_url":"https://api.github.com/users/marsishandsome/followers","following_url":"https://api.github.com/users/marsishandsome/following{/other_user}","gists_url":"https://api.github.com/users/marsishandsome/gists{/gist_id}","starred_url":"https://api.github.com/users/marsishandsome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marsishandsome/subscriptions","organizations_url":"https://api.github.com/users/marsishandsome/orgs","repos_url":"https://api.github.com/users/marsishandsome/repos","events_url":"https://api.github.com/users/marsishandsome/events{/privacy}","received_events_url":"https://api.github.com/users/marsishandsome/received_events","type":"User","site_admin":false},"body":"I'm implementing a JVM profiling tool, and I use InfluxDB to store the profiling data.\r\nIn my application, I do not want InfluxDB Client to allocate it's own thread.\r\nSo an addition argument (ThreadFactory) is added.","created_at":"2015-08-21T09:22:42Z","updated_at":"2015-09-08T01:26:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"36318f9f31c11659d2efcecec088a04177d5fdbc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/influxdb/influxdb-java/pulls/79/commits","review_comments_url":"https://api.github.com/repos/influxdb/influxdb-java/pulls/79/comments","review_comment_url":"https://api.github.com/repos/influxdb/influxdb-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/influxdb/influxdb-java/issues/79/comments","statuses_url":"https://api.github.com/repos/influxdb/influxdb-java/statuses/980f55c45643d82caa5dc606cffddfafb834ac26","head":{"label":"marsishandsome:ThreadFactory","ref":"ThreadFactory","sha":"980f55c45643d82caa5dc606cffddfafb834ac26","user":{"login":"marsishandsome","id":5574887,"avatar_url":"https://avatars.githubusercontent.com/u/5574887?v=3","gravatar_id":"","url":"https://api.github.com/users/marsishandsome","html_url":"https://github.com/marsishandsome","followers_url":"https://api.github.com/users/marsishandsome/followers","following_url":"https://api.github.com/users/marsishandsome/following{/other_user}","gists_url":"https://api.github.com/users/marsishandsome/gists{/gist_id}","starred_url":"https://api.github.com/users/marsishandsome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marsishandsome/subscriptions","organizations_url":"https://api.github.com/users/marsishandsome/orgs","repos_url":"https://api.github.com/users/marsishandsome/repos","events_url":"https://api.github.com/users/marsishandsome/events{/privacy}","received_events_url":"https://api.github.com/users/marsishandsome/received_events","type":"User","site_admin":false},"repo":{"id":41146467,"name":"influxdb-java","full_name":"marsishandsome/influxdb-java","owner":{"login":"marsishandsome","id":5574887,"avatar_url":"https://avatars.githubusercontent.com/u/5574887?v=3","gravatar_id":"","url":"https://api.github.com/users/marsishandsome","html_url":"https://github.com/marsishandsome","followers_url":"https://api.github.com/users/marsishandsome/followers","following_url":"https://api.github.com/users/marsishandsome/following{/other_user}","gists_url":"https://api.github.com/users/marsishandsome/gists{/gist_id}","starred_url":"https://api.github.com/users/marsishandsome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marsishandsome/subscriptions","organizations_url":"https://api.github.com/users/marsishandsome/orgs","repos_url":"https://api.github.com/users/marsishandsome/repos","events_url":"https://api.github.com/users/marsishandsome/events{/privacy}","received_events_url":"https://api.github.com/users/marsishandsome/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/marsishandsome/influxdb-java","description":"Java client for InfluxDB","fork":true,"url":"https://api.github.com/repos/marsishandsome/influxdb-java","forks_url":"https://api.github.com/repos/marsishandsome/influxdb-java/forks","keys_url":"https://api.github.com/repos/marsishandsome/influxdb-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/marsishandsome/influxdb-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/marsishandsome/influxdb-java/teams","hooks_url":"https://api.github.com/repos/marsishandsome/influxdb-java/hooks","issue_events_url":"https://api.github.com/repos/marsishandsome/influxdb-java/issues/events{/number}","events_url":"https://api.github.com/repos/marsishandsome/influxdb-java/events","assignees_url":"https://api.github.com/repos/marsishandsome/influxdb-java/assignees{/user}","branches_url":"https://api.github.com/repos/marsishandsome/influxdb-java/branches{/branch}","tags_url":"https://api.github.com/repos/marsishandsome/influxdb-java/tags","blobs_url":"https://api.github.com/repos/marsishandsome/influxdb-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/marsishandsome/influxdb-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/marsishandsome/influxdb-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/marsishandsome/influxdb-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/marsishandsome/influxdb-java/statuses/{sha}","languages_url":"https://api.github.com/repos/marsishandsome/influxdb-java/languages","stargazers_url":"https://api.github.com/repos/marsishandsome/influxdb-java/stargazers","contributors_url":"https://api.github.com/repos/marsishandsome/influxdb-java/contributors","subscribers_url":"https://api.github.com/repos/marsishandsome/influxdb-java/subscribers","subscription_url":"https://api.github.com/repos/marsishandsome/influxdb-java/subscription","commits_url":"https://api.github.com/repos/marsishandsome/influxdb-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/marsishandsome/influxdb-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/marsishandsome/influxdb-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/marsishandsome/influxdb-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/marsishandsome/influxdb-java/contents/{+path}","compare_url":"https://api.github.com/repos/marsishandsome/influxdb-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/marsishandsome/influxdb-java/merges","archive_url":"https://api.github.com/repos/marsishandsome/influxdb-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/marsishandsome/influxdb-java/downloads","issues_url":"https://api.github.com/repos/marsishandsome/influxdb-java/issues{/number}","pulls_url":"https://api.github.com/repos/marsishandsome/influxdb-java/pulls{/number}","milestones_url":"https://api.github.com/repos/marsishandsome/influxdb-java/milestones{/number}","notifications_url":"https://api.github.com/repos/marsishandsome/influxdb-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/marsishandsome/influxdb-java/labels{/name}","releases_url":"https://api.github.com/repos/marsishandsome/influxdb-java/releases{/id}","created_at":"2015-08-21T09:04:03Z","updated_at":"2015-08-21T09:04:03Z","pushed_at":"2015-09-08T01:26:01Z","git_url":"git://github.com/marsishandsome/influxdb-java.git","ssh_url":"git@github.com:marsishandsome/influxdb-java.git","clone_url":"https://github.com/marsishandsome/influxdb-java.git","svn_url":"https://github.com/marsishandsome/influxdb-java","homepage":null,"size":289,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"influxdb:master","ref":"master","sha":"44516de88062ce15bb98a3ddc8bd3f9cfe4ba537","user":{"login":"influxdb","id":5713248,"avatar_url":"https://avatars.githubusercontent.com/u/5713248?v=3","gravatar_id":"","url":"https://api.github.com/users/influxdb","html_url":"https://github.com/influxdb","followers_url":"https://api.github.com/users/influxdb/followers","following_url":"https://api.github.com/users/influxdb/following{/other_user}","gists_url":"https://api.github.com/users/influxdb/gists{/gist_id}","starred_url":"https://api.github.com/users/influxdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influxdb/subscriptions","organizations_url":"https://api.github.com/users/influxdb/orgs","repos_url":"https://api.github.com/users/influxdb/repos","events_url":"https://api.github.com/users/influxdb/events{/privacy}","received_events_url":"https://api.github.com/users/influxdb/received_events","type":"Organization","site_admin":false},"repo":{"id":19323986,"name":"influxdb-java","full_name":"influxdb/influxdb-java","owner":{"login":"influxdb","id":5713248,"avatar_url":"https://avatars.githubusercontent.com/u/5713248?v=3","gravatar_id":"","url":"https://api.github.com/users/influxdb","html_url":"https://github.com/influxdb","followers_url":"https://api.github.com/users/influxdb/followers","following_url":"https://api.github.com/users/influxdb/following{/other_user}","gists_url":"https://api.github.com/users/influxdb/gists{/gist_id}","starred_url":"https://api.github.com/users/influxdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influxdb/subscriptions","organizations_url":"https://api.github.com/users/influxdb/orgs","repos_url":"https://api.github.com/users/influxdb/repos","events_url":"https://api.github.com/users/influxdb/events{/privacy}","received_events_url":"https://api.github.com/users/influxdb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/influxdb/influxdb-java","description":"Java client for InfluxDB","fork":false,"url":"https://api.github.com/repos/influxdb/influxdb-java","forks_url":"https://api.github.com/repos/influxdb/influxdb-java/forks","keys_url":"https://api.github.com/repos/influxdb/influxdb-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/influxdb/influxdb-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/influxdb/influxdb-java/teams","hooks_url":"https://api.github.com/repos/influxdb/influxdb-java/hooks","issue_events_url":"https://api.github.com/repos/influxdb/influxdb-java/issues/events{/number}","events_url":"https://api.github.com/repos/influxdb/influxdb-java/events","assignees_url":"https://api.github.com/repos/influxdb/influxdb-java/assignees{/user}","branches_url":"https://api.github.com/repos/influxdb/influxdb-java/branches{/branch}","tags_url":"https://api.github.com/repos/influxdb/influxdb-java/tags","blobs_url":"https://api.github.com/repos/influxdb/influxdb-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/influxdb/influxdb-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/influxdb/influxdb-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/influxdb/influxdb-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/influxdb/influxdb-java/statuses/{sha}","languages_url":"https://api.github.com/repos/influxdb/influxdb-java/languages","stargazers_url":"https://api.github.com/repos/influxdb/influxdb-java/stargazers","contributors_url":"https://api.github.com/repos/influxdb/influxdb-java/contributors","subscribers_url":"https://api.github.com/repos/influxdb/influxdb-java/subscribers","subscription_url":"https://api.github.com/repos/influxdb/influxdb-java/subscription","commits_url":"https://api.github.com/repos/influxdb/influxdb-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/influxdb/influxdb-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/influxdb/influxdb-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/influxdb/influxdb-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/influxdb/influxdb-java/contents/{+path}","compare_url":"https://api.github.com/repos/influxdb/influxdb-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/influxdb/influxdb-java/merges","archive_url":"https://api.github.com/repos/influxdb/influxdb-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/influxdb/influxdb-java/downloads","issues_url":"https://api.github.com/repos/influxdb/influxdb-java/issues{/number}","pulls_url":"https://api.github.com/repos/influxdb/influxdb-java/pulls{/number}","milestones_url":"https://api.github.com/repos/influxdb/influxdb-java/milestones{/number}","notifications_url":"https://api.github.com/repos/influxdb/influxdb-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/influxdb/influxdb-java/labels{/name}","releases_url":"https://api.github.com/repos/influxdb/influxdb-java/releases{/id}","created_at":"2014-04-30T18:56:32Z","updated_at":"2015-09-06T00:20:34Z","pushed_at":"2015-09-08T01:26:01Z","git_url":"git://github.com/influxdb/influxdb-java.git","ssh_url":"git@github.com:influxdb/influxdb-java.git","clone_url":"https://github.com/influxdb/influxdb-java.git","svn_url":"https://github.com/influxdb/influxdb-java","homepage":null,"size":870,"stargazers_count":89,"watchers_count":89,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":69,"mirror_url":null,"open_issues_count":11,"forks":69,"open_issues":11,"watchers":89,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/influxdb/influxdb-java/pulls/79"},"html":{"href":"https://github.com/influxdb/influxdb-java/pull/79"},"issue":{"href":"https://api.github.com/repos/influxdb/influxdb-java/issues/79"},"comments":{"href":"https://api.github.com/repos/influxdb/influxdb-java/issues/79/comments"},"review_comments":{"href":"https://api.github.com/repos/influxdb/influxdb-java/pulls/79/comments"},"review_comment":{"href":"https://api.github.com/repos/influxdb/influxdb-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/influxdb/influxdb-java/pulls/79/commits"},"statuses":{"href":"https://api.github.com/repos/influxdb/influxdb-java/statuses/980f55c45643d82caa5dc606cffddfafb834ac26"}}}}