|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.continuent.tungsten.replicator.util.WatchManager<E>
public class WatchManager<E>
Manages a list of event watches and allows clients to submit events to the list for processing to see if there is a predicate match. Methods are synchronized to ensure the object is updated transactionally and to ensure proper visibility across threads.
| Constructor Summary | |
|---|---|
WatchManager()
|
|
| Method Summary | |
|---|---|
void |
cancelAll()
Cancel all pending watches. |
java.util.List<Watch<E>> |
getWatches()
Returns the current list of watches. |
void |
process(E event,
int taskId)
Submits an event for watch processing. |
Watch<E> |
watch(WatchPredicate<E> predicate,
int taskCount)
Adds a new watch predicate to the queue. |
Watch<E> |
watch(WatchPredicate<E> predicate,
int taskCount,
WatchAction<E> action)
Adds a new watch predicate to the queue including an accompanying action. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WatchManager()
| Method Detail |
|---|
public Watch<E> watch(WatchPredicate<E> predicate,
int taskCount,
WatchAction<E> action)
public Watch<E> watch(WatchPredicate<E> predicate,
int taskCount)
public java.util.List<Watch<E>> getWatches()
public void process(E event,
int taskId)
throws java.lang.InterruptedException
event - An event for processing.taskId - Id of task for which we are checking the predicate
java.lang.InterruptedExceptionpublic void cancelAll()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||