public class AsyncCoordinatorImpl<E extends Serializable> extends Object implements AsyncCoordinator<E>
| Modifier and Type | Class and Description |
|---|---|
static interface |
AsyncCoordinatorImpl.Callback |
| Constructor and Description |
|---|
AsyncCoordinatorImpl(String fullAsyncName,
String cacheName,
AsyncConfig config,
ToolkitInstanceFactory toolkitInstanceFactory,
AsyncCoordinatorImpl.Callback asyncFactoryCallback) |
| Modifier and Type | Method and Description |
|---|---|
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 |
public AsyncCoordinatorImpl(String fullAsyncName, String cacheName, AsyncConfig config, ToolkitInstanceFactory toolkitInstanceFactory, AsyncCoordinatorImpl.Callback asyncFactoryCallback)
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()
AsyncCoordinatorIllegalStateExceptionstop 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()
AsyncCoordinatordestroy in interface AsyncCoordinator<E extends Serializable>Copyright © 2003–2024 Terracotta, Inc.. All rights reserved.