|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ektorp.impl.changes.ContinuousChangesFeed
public final class ContinuousChangesFeed
Constructor Summary | |
---|---|
ContinuousChangesFeed(String dbName,
HttpResponse httpResponse)
|
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,
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. |
DocumentChange |
poll()
Retrieves and removes the head of this changes feed, do not wait until an element becomes available. returns null if empty |
int |
queueSize()
|
void |
run()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContinuousChangesFeed(String dbName, HttpResponse httpResponse)
Method Detail |
---|
public DocumentChange next() throws InterruptedException
ChangesFeed
next
in interface ChangesFeed
InterruptedException
- when this changes feed is closed or otherwise is interruptedpublic DocumentChange poll() throws InterruptedException
ChangesFeed
poll
in interface ChangesFeed
InterruptedException
- when this changes feed is closed or otherwise is interruptedpublic DocumentChange next(long timeout, TimeUnit unit) throws InterruptedException
ChangesFeed
next
in interface ChangesFeed
InterruptedException
- when this changes feed is closed or otherwise is interruptedpublic void cancel()
ChangesFeed
cancel
in interface ChangesFeed
public boolean isAlive()
isAlive
in interface ChangesFeed
public int queueSize()
queueSize
in interface ChangesFeed
public void run()
run
in interface Runnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |