couchbase/couchbase-lite-java-core — pull request #362 by hideki (2014-12-19 06:51:20+00:00)
Title: Feature/issue 358 idle state

Fix for #358 - Invalid state of Push replicator between IDLE and RUNNING under continuous mode

Solutions
1. Add state-machine trigger from IDLE to RUNNING
2. Extends LinkedBlockingQueue to support queue event listener
3. Call waitForPendingFuture() method and switch state from IDLE to RUNNING if necessary whenever Future task is added into pending queue.
4. Switch state from RUNNING to IDLE if necessary at end of waitForPendingFuture() method