|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ChangesFeed
ChangesFeed listens to the _changes feed in a CouchDB database. Feeds are created by calling the method changesFeed(ChangesCommand cmd) in CouchDbConnector. An active feed buffers incoming changes in a unbounded queue that will grow until OutOfMemoryException if not polled.
| Method Summary | |
|---|---|
void |
cancel()
Will close this feed and interrupt any threads waiting on next() |
boolean |
isAlive()
|
DocumentChange |
next()
Retrieves and removes the head of this changes feed, waiting if necessary until an element becomes available. |
DocumentChange |
next(long timeout,
java.util.concurrent.TimeUnit unit)
Retrieves and removes the head of this changes feed, waiting up to the specified wait time if necessary for an element to become available. |
int |
queueSize()
|
| Method Detail |
|---|
DocumentChange next()
throws java.lang.InterruptedException
java.lang.InterruptedException - when this changes feed is closed or otherwise is interrupted
DocumentChange next(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException
timeout - unit -
java.lang.InterruptedException - when this changes feed is closed or otherwise is interruptedvoid cancel()
boolean isAlive()
int queueSize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||