| 
ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.ehcache.writer.writebehind.AbstractWriteBehindQueue
public abstract class AbstractWriteBehindQueue
Abstract implementation of a WriteBehindQueue.
| Constructor Summary | |
|---|---|
AbstractWriteBehindQueue(CacheConfiguration config)
Create a new write behind queue.  | 
|
| Method Summary | |
|---|---|
protected abstract  void | 
addItem(SingleOperation operation)
Add an item to the write behind queue  | 
 void | 
delete(CacheEntry entry)
Add a delete operation for the given cache entry  | 
protected  Thread | 
getProcessingThread()
Backdoor to allow killing the processing thread for testing purposes.  | 
abstract  long | 
getQueueSize()
Gets the best estimate for items in the queue still awaiting processing.  | 
protected abstract  List<SingleOperation> | 
quarantineItems()
Quarantine items to be processed.  | 
protected abstract  void | 
reinsertUnprocessedItems(List<SingleOperation> operations)
Reinsert any unfinished operations into the queue.  | 
 void | 
setOperationsFilter(OperationsFilter filter)
Set the operations filter that should be used.  | 
 void | 
start(CacheWriter writer)
Start the write behind queue with a cache writer  | 
 void | 
stop()
Stop the coordinator and all the internal data structures.  | 
 void | 
write(Element element)
Add a write operation for a given element.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public AbstractWriteBehindQueue(CacheConfiguration config)
config - the configuration for the queue| Method Detail | 
|---|
protected abstract List<SingleOperation> quarantineItems()
protected abstract void addItem(SingleOperation operation)
operation - operation to be doneprotected abstract void reinsertUnprocessedItems(List<SingleOperation> operations)
operations - list of unfinished operationspublic void start(CacheWriter writer)
start in interface WriteBehindwriter - the cache writer that should be used to process the operationsWriteBehind.stop()public void setOperationsFilter(OperationsFilter filter)
setOperationsFilter in interface WriteBehindfilter - the filter that will be used as of nowpublic void write(Element element)
write in interface WriteBehindelement - the element for which a write operation will be added to the write behind queuepublic void delete(CacheEntry entry)
delete in interface WriteBehindentry - the cache entry for which a delete operation will be added to the write behind queue
public void stop()
          throws CacheException
stop in interface WriteBehindCacheExceptionWriteBehind.start(net.sf.ehcache.writer.CacheWriter)public abstract long getQueueSize()
getQueueSize in interface WriteBehindprotected Thread getProcessingThread()
  | 
ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||