org.terracotta.modules.ehcache.async
Interface AsyncCoordinator<E extends Serializable>

All Known Implementing Classes:
AsyncCoordinatorImpl

public interface AsyncCoordinator<E extends Serializable>


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)
          Sets a filter to filter out the items.
 void start(ItemProcessor<E> processor, 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
 

Method Detail

start

void start(ItemProcessor<E> processor,
           int processingConcurrency,
           ItemScatterPolicy<? super E> policy)
Throws:
IllegalArgumentException - if processingConcurrency is less than 1 OR processor is null

add

void add(E item)
Parameters:
item - null item are ignored.

stop

void stop()
Stops and waits for the current processing to finish.
Calling this multiple times will result in IllegalStateException


setOperationsFilter

void setOperationsFilter(ItemsFilter<E> filter)
Sets a filter to filter out the items.


getQueueSize

long getQueueSize()
Returns:
the current items to be processed

destroy

void destroy()
Destroy all clustered state associated with the given async coordinator.



Copyright © 2003-2013 Terracotta, Inc.. All Rights Reserved.