{"action":"closed","number":3487,"pull_request":{"url":"https://api.github.com/repos/ReactiveX/RxJava/pulls/3487","id":49478850,"html_url":"https://github.com/ReactiveX/RxJava/pull/3487","diff_url":"https://github.com/ReactiveX/RxJava/pull/3487.diff","patch_url":"https://github.com/ReactiveX/RxJava/pull/3487.patch","issue_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/3487","number":3487,"state":"closed","locked":false,"title":"1.x: OnBackpressureBuffer: DROP_LATEST and DROP_OLDEST","user":{"login":"srvaroa","id":346110,"avatar_url":"https://avatars.githubusercontent.com/u/346110?v=3","gravatar_id":"","url":"https://api.github.com/users/srvaroa","html_url":"https://github.com/srvaroa","followers_url":"https://api.github.com/users/srvaroa/followers","following_url":"https://api.github.com/users/srvaroa/following{/other_user}","gists_url":"https://api.github.com/users/srvaroa/gists{/gist_id}","starred_url":"https://api.github.com/users/srvaroa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srvaroa/subscriptions","organizations_url":"https://api.github.com/users/srvaroa/orgs","repos_url":"https://api.github.com/users/srvaroa/repos","events_url":"https://api.github.com/users/srvaroa/events{/privacy}","received_events_url":"https://api.github.com/users/srvaroa/received_events","type":"User","site_admin":false},"body":"Introduce a new interface BackpressureOverflowStrategy that allows implementing different handlers for an overflow situation.  This patch adds three implementations, reachable via OverflowStrategy:\r\n\r\n    static class OverflowStrategy {\r\n        static final BackpressureOverflowStrategy DEFAULT = Error.INSTANCE;\r\n        static final Error ERROR = Error.INSTANCE;\r\n        static final DropOldest DROP_OLDEST = DropOldest.INSTANCE;\r\n        static final DropLatest DROP_LATEST = DropLatest.INSTANCE;\r\n    }\r\n\r\nThe behavior for each is the following:\r\n\r\n- ERROR remains the default as the existing implementation.\r\n- DROP_LATEST will drop newly produced items after the buffer fills up.\r\n- DROP_OLDEST will drop the oldest elements in the buffer, making room for\r\n  newer ones.\r\n\r\nIn all cases, a drop will result in a notification to the producer by invoking the onOverflow callback.\r\n\r\nNone of the two new behaviours (DROP_*) will unsubscribe from the source nor onError.","created_at":"2015-11-02T20:07:28Z","updated_at":"2016-03-17T17:58:36Z","closed_at":"2016-03-17T17:58:36Z","merged_at":"2016-03-17T17:58:36Z","merge_commit_sha":"ffb09dbfa391fe14667358afbfd5def9201300eb","assignee":null,"milestone":{"url":"https://api.github.com/repos/ReactiveX/RxJava/milestones/11","html_url":"https://github.com/ReactiveX/RxJava/milestones/1.0.x","labels_url":"https://api.github.com/repos/ReactiveX/RxJava/milestones/11/labels","id":817560,"number":11,"title":"1.0.x","description":"Patch fixes on 1.0.x that do not add new functionality.","creator":{"login":"benjchristensen","id":813492,"avatar_url":"https://avatars.githubusercontent.com/u/813492?v=3","gravatar_id":"","url":"https://api.github.com/users/benjchristensen","html_url":"https://github.com/benjchristensen","followers_url":"https://api.github.com/users/benjchristensen/followers","following_url":"https://api.github.com/users/benjchristensen/following{/other_user}","gists_url":"https://api.github.com/users/benjchristensen/gists{/gist_id}","starred_url":"https://api.github.com/users/benjchristensen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjchristensen/subscriptions","organizations_url":"https://api.github.com/users/benjchristensen/orgs","repos_url":"https://api.github.com/users/benjchristensen/repos","events_url":"https://api.github.com/users/benjchristensen/events{/privacy}","received_events_url":"https://api.github.com/users/benjchristensen/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":104,"state":"open","created_at":"2014-10-07T22:28:55Z","updated_at":"2016-03-17T17:58:36Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/ReactiveX/RxJava/pulls/3487/commits","review_comments_url":"https://api.github.com/repos/ReactiveX/RxJava/pulls/3487/comments","review_comment_url":"https://api.github.com/repos/ReactiveX/RxJava/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/3487/comments","statuses_url":"https://api.github.com/repos/ReactiveX/RxJava/statuses/e4598a501907b78ec05908ffbca274eb9ea29ac9","head":{"label":"srvaroa:1.x","ref":"1.x","sha":"e4598a501907b78ec05908ffbca274eb9ea29ac9","user":{"login":"srvaroa","id":346110,"avatar_url":"https://avatars.githubusercontent.com/u/346110?v=3","gravatar_id":"","url":"https://api.github.com/users/srvaroa","html_url":"https://github.com/srvaroa","followers_url":"https://api.github.com/users/srvaroa/followers","following_url":"https://api.github.com/users/srvaroa/following{/other_user}","gists_url":"https://api.github.com/users/srvaroa/gists{/gist_id}","starred_url":"https://api.github.com/users/srvaroa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srvaroa/subscriptions","organizations_url":"https://api.github.com/users/srvaroa/orgs","repos_url":"https://api.github.com/users/srvaroa/repos","events_url":"https://api.github.com/users/srvaroa/events{/privacy}","received_events_url":"https://api.github.com/users/srvaroa/received_events","type":"User","site_admin":false},"repo":{"id":21215090,"name":"RxJava","full_name":"srvaroa/RxJava","owner":{"login":"srvaroa","id":346110,"avatar_url":"https://avatars.githubusercontent.com/u/346110?v=3","gravatar_id":"","url":"https://api.github.com/users/srvaroa","html_url":"https://github.com/srvaroa","followers_url":"https://api.github.com/users/srvaroa/followers","following_url":"https://api.github.com/users/srvaroa/following{/other_user}","gists_url":"https://api.github.com/users/srvaroa/gists{/gist_id}","starred_url":"https://api.github.com/users/srvaroa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srvaroa/subscriptions","organizations_url":"https://api.github.com/users/srvaroa/orgs","repos_url":"https://api.github.com/users/srvaroa/repos","events_url":"https://api.github.com/users/srvaroa/events{/privacy}","received_events_url":"https://api.github.com/users/srvaroa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/srvaroa/RxJava","description":"RxJava – Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM.","fork":true,"url":"https://api.github.com/repos/srvaroa/RxJava","forks_url":"https://api.github.com/repos/srvaroa/RxJava/forks","keys_url":"https://api.github.com/repos/srvaroa/RxJava/keys{/key_id}","collaborators_url":"https://api.github.com/repos/srvaroa/RxJava/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/srvaroa/RxJava/teams","hooks_url":"https://api.github.com/repos/srvaroa/RxJava/hooks","issue_events_url":"https://api.github.com/repos/srvaroa/RxJava/issues/events{/number}","events_url":"https://api.github.com/repos/srvaroa/RxJava/events","assignees_url":"https://api.github.com/repos/srvaroa/RxJava/assignees{/user}","branches_url":"https://api.github.com/repos/srvaroa/RxJava/branches{/branch}","tags_url":"https://api.github.com/repos/srvaroa/RxJava/tags","blobs_url":"https://api.github.com/repos/srvaroa/RxJava/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/srvaroa/RxJava/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/srvaroa/RxJava/git/refs{/sha}","trees_url":"https://api.github.com/repos/srvaroa/RxJava/git/trees{/sha}","statuses_url":"https://api.github.com/repos/srvaroa/RxJava/statuses/{sha}","languages_url":"https://api.github.com/repos/srvaroa/RxJava/languages","stargazers_url":"https://api.github.com/repos/srvaroa/RxJava/stargazers","contributors_url":"https://api.github.com/repos/srvaroa/RxJava/contributors","subscribers_url":"https://api.github.com/repos/srvaroa/RxJava/subscribers","subscription_url":"https://api.github.com/repos/srvaroa/RxJava/subscription","commits_url":"https://api.github.com/repos/srvaroa/RxJava/commits{/sha}","git_commits_url":"https://api.github.com/repos/srvaroa/RxJava/git/commits{/sha}","comments_url":"https://api.github.com/repos/srvaroa/RxJava/comments{/number}","issue_comment_url":"https://api.github.com/repos/srvaroa/RxJava/issues/comments{/number}","contents_url":"https://api.github.com/repos/srvaroa/RxJava/contents/{+path}","compare_url":"https://api.github.com/repos/srvaroa/RxJava/compare/{base}...{head}","merges_url":"https://api.github.com/repos/srvaroa/RxJava/merges","archive_url":"https://api.github.com/repos/srvaroa/RxJava/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/srvaroa/RxJava/downloads","issues_url":"https://api.github.com/repos/srvaroa/RxJava/issues{/number}","pulls_url":"https://api.github.com/repos/srvaroa/RxJava/pulls{/number}","milestones_url":"https://api.github.com/repos/srvaroa/RxJava/milestones{/number}","notifications_url":"https://api.github.com/repos/srvaroa/RxJava/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/srvaroa/RxJava/labels{/name}","releases_url":"https://api.github.com/repos/srvaroa/RxJava/releases{/id}","deployments_url":"https://api.github.com/repos/srvaroa/RxJava/deployments","created_at":"2014-06-25T19:11:34Z","updated_at":"2014-06-25T17:35:13Z","pushed_at":"2016-03-16T20:41:34Z","git_url":"git://github.com/srvaroa/RxJava.git","ssh_url":"git@github.com:srvaroa/RxJava.git","clone_url":"https://github.com/srvaroa/RxJava.git","svn_url":"https://github.com/srvaroa/RxJava","homepage":"","size":18279,"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":"ReactiveX:1.x","ref":"1.x","sha":"f7321d2e04f63abc4a18a79aa07ab24cd27cf032","user":{"login":"ReactiveX","id":6407041,"avatar_url":"https://avatars.githubusercontent.com/u/6407041?v=3","gravatar_id":"","url":"https://api.github.com/users/ReactiveX","html_url":"https://github.com/ReactiveX","followers_url":"https://api.github.com/users/ReactiveX/followers","following_url":"https://api.github.com/users/ReactiveX/following{/other_user}","gists_url":"https://api.github.com/users/ReactiveX/gists{/gist_id}","starred_url":"https://api.github.com/users/ReactiveX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ReactiveX/subscriptions","organizations_url":"https://api.github.com/users/ReactiveX/orgs","repos_url":"https://api.github.com/users/ReactiveX/repos","events_url":"https://api.github.com/users/ReactiveX/events{/privacy}","received_events_url":"https://api.github.com/users/ReactiveX/received_events","type":"Organization","site_admin":false},"repo":{"id":7508411,"name":"RxJava","full_name":"ReactiveX/RxJava","owner":{"login":"ReactiveX","id":6407041,"avatar_url":"https://avatars.githubusercontent.com/u/6407041?v=3","gravatar_id":"","url":"https://api.github.com/users/ReactiveX","html_url":"https://github.com/ReactiveX","followers_url":"https://api.github.com/users/ReactiveX/followers","following_url":"https://api.github.com/users/ReactiveX/following{/other_user}","gists_url":"https://api.github.com/users/ReactiveX/gists{/gist_id}","starred_url":"https://api.github.com/users/ReactiveX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ReactiveX/subscriptions","organizations_url":"https://api.github.com/users/ReactiveX/orgs","repos_url":"https://api.github.com/users/ReactiveX/repos","events_url":"https://api.github.com/users/ReactiveX/events{/privacy}","received_events_url":"https://api.github.com/users/ReactiveX/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ReactiveX/RxJava","description":"RxJava – Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM.","fork":false,"url":"https://api.github.com/repos/ReactiveX/RxJava","forks_url":"https://api.github.com/repos/ReactiveX/RxJava/forks","keys_url":"https://api.github.com/repos/ReactiveX/RxJava/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ReactiveX/RxJava/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ReactiveX/RxJava/teams","hooks_url":"https://api.github.com/repos/ReactiveX/RxJava/hooks","issue_events_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/events{/number}","events_url":"https://api.github.com/repos/ReactiveX/RxJava/events","assignees_url":"https://api.github.com/repos/ReactiveX/RxJava/assignees{/user}","branches_url":"https://api.github.com/repos/ReactiveX/RxJava/branches{/branch}","tags_url":"https://api.github.com/repos/ReactiveX/RxJava/tags","blobs_url":"https://api.github.com/repos/ReactiveX/RxJava/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ReactiveX/RxJava/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ReactiveX/RxJava/git/refs{/sha}","trees_url":"https://api.github.com/repos/ReactiveX/RxJava/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ReactiveX/RxJava/statuses/{sha}","languages_url":"https://api.github.com/repos/ReactiveX/RxJava/languages","stargazers_url":"https://api.github.com/repos/ReactiveX/RxJava/stargazers","contributors_url":"https://api.github.com/repos/ReactiveX/RxJava/contributors","subscribers_url":"https://api.github.com/repos/ReactiveX/RxJava/subscribers","subscription_url":"https://api.github.com/repos/ReactiveX/RxJava/subscription","commits_url":"https://api.github.com/repos/ReactiveX/RxJava/commits{/sha}","git_commits_url":"https://api.github.com/repos/ReactiveX/RxJava/git/commits{/sha}","comments_url":"https://api.github.com/repos/ReactiveX/RxJava/comments{/number}","issue_comment_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/comments{/number}","contents_url":"https://api.github.com/repos/ReactiveX/RxJava/contents/{+path}","compare_url":"https://api.github.com/repos/ReactiveX/RxJava/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ReactiveX/RxJava/merges","archive_url":"https://api.github.com/repos/ReactiveX/RxJava/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ReactiveX/RxJava/downloads","issues_url":"https://api.github.com/repos/ReactiveX/RxJava/issues{/number}","pulls_url":"https://api.github.com/repos/ReactiveX/RxJava/pulls{/number}","milestones_url":"https://api.github.com/repos/ReactiveX/RxJava/milestones{/number}","notifications_url":"https://api.github.com/repos/ReactiveX/RxJava/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ReactiveX/RxJava/labels{/name}","releases_url":"https://api.github.com/repos/ReactiveX/RxJava/releases{/id}","deployments_url":"https://api.github.com/repos/ReactiveX/RxJava/deployments","created_at":"2013-01-08T20:11:48Z","updated_at":"2016-03-17T17:48:24Z","pushed_at":"2016-03-17T17:58:37Z","git_url":"git://github.com/ReactiveX/RxJava.git","ssh_url":"git@github.com:ReactiveX/RxJava.git","clone_url":"https://github.com/ReactiveX/RxJava.git","svn_url":"https://github.com/ReactiveX/RxJava","homepage":"","size":26360,"stargazers_count":11990,"watchers_count":11990,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1878,"mirror_url":null,"open_issues_count":117,"forks":1878,"open_issues":117,"watchers":11990,"default_branch":"1.x"}},"_links":{"self":{"href":"https://api.github.com/repos/ReactiveX/RxJava/pulls/3487"},"html":{"href":"https://github.com/ReactiveX/RxJava/pull/3487"},"issue":{"href":"https://api.github.com/repos/ReactiveX/RxJava/issues/3487"},"comments":{"href":"https://api.github.com/repos/ReactiveX/RxJava/issues/3487/comments"},"review_comments":{"href":"https://api.github.com/repos/ReactiveX/RxJava/pulls/3487/comments"},"review_comment":{"href":"https://api.github.com/repos/ReactiveX/RxJava/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ReactiveX/RxJava/pulls/3487/commits"},"statuses":{"href":"https://api.github.com/repos/ReactiveX/RxJava/statuses/e4598a501907b78ec05908ffbca274eb9ea29ac9"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"akarnokd","id":1269832,"avatar_url":"https://avatars.githubusercontent.com/u/1269832?v=3","gravatar_id":"","url":"https://api.github.com/users/akarnokd","html_url":"https://github.com/akarnokd","followers_url":"https://api.github.com/users/akarnokd/followers","following_url":"https://api.github.com/users/akarnokd/following{/other_user}","gists_url":"https://api.github.com/users/akarnokd/gists{/gist_id}","starred_url":"https://api.github.com/users/akarnokd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akarnokd/subscriptions","organizations_url":"https://api.github.com/users/akarnokd/orgs","repos_url":"https://api.github.com/users/akarnokd/repos","events_url":"https://api.github.com/users/akarnokd/events{/privacy}","received_events_url":"https://api.github.com/users/akarnokd/received_events","type":"User","site_admin":false},"comments":26,"review_comments":24,"commits":1,"additions":308,"deletions":48,"changed_files":5}}