|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.terracotta.modules.ehcache.async.AsyncCoordinatorImpl<E>
public class AsyncCoordinatorImpl<E extends Serializable>
An AsyncCoordinator allows work to be added and processed asynchronously in a fault-tolerant and high performance fashion.
| Nested Class Summary | |
|---|---|
static interface |
AsyncCoordinatorImpl.Callback
|
| Constructor Summary | |
|---|---|
AsyncCoordinatorImpl(String fullAsyncName,
AsyncConfig config,
ToolkitInstanceFactory toolkitInstanceFactory,
AsyncCoordinatorImpl.Callback stopCallable)
|
|
| Method Summary | |
|---|---|
void |
add(E item)
|
void |
destroy()
Destroy all clustered state associated with the given async coordinator. |
long |
getQueueSize()
|
void |
setOperationsFilter(ItemsFilter<E> filter)
Attach the specified QuarantinedItemsFilter to this coordinator. |
void |
start(ItemProcessor<E> itemProcessor,
int processingConcurrency,
ItemScatterPolicy<? super E> policy)
|
void |
stop()
Stops and waits for the current processing to finish. Calling this multiple times will result in IllegalStateException |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AsyncCoordinatorImpl(String fullAsyncName,
AsyncConfig config,
ToolkitInstanceFactory toolkitInstanceFactory,
AsyncCoordinatorImpl.Callback stopCallable)
| Method Detail |
|---|
public void start(ItemProcessor<E> itemProcessor,
int processingConcurrency,
ItemScatterPolicy<? super E> policy)
start in interface AsyncCoordinator<E extends Serializable>public void add(E item)
add in interface AsyncCoordinator<E extends Serializable>item - null item are ignored.public void stop()
AsyncCoordinatorIllegalStateException
stop in interface AsyncCoordinator<E extends Serializable>public void setOperationsFilter(ItemsFilter<E> filter)
QuarantinedItemsFilter to this coordinator.
A quarantined items filter allows scheduled work to be filtered (and possibly skipped) before being executed.
Assigning null as the quarantined filter causes any existing filter to be removed.
setOperationsFilter in interface AsyncCoordinator<E extends Serializable>filter - filter to be appliedpublic long getQueueSize()
getQueueSize in interface AsyncCoordinator<E extends Serializable>public void destroy()
AsyncCoordinator
destroy in interface AsyncCoordinator<E extends Serializable>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||