org.ehcache.loaderwriter.writebehind
Class LocalHeapWriteBehindQueue<K,V>

java.lang.Object
  extended by org.ehcache.loaderwriter.writebehind.AbstractWriteBehindQueue<K,V>
      extended by org.ehcache.loaderwriter.writebehind.LocalHeapWriteBehindQueue<K,V>
All Implemented Interfaces:
WriteBehind<K,V>

public class LocalHeapWriteBehindQueue<K,V>
extends AbstractWriteBehindQueue<K,V>


Method Summary
protected  void addItem(SingleOperation<K,V> operation)
          Add an item to the write behind queue
protected  SingleOperation<K,V> getLatestOperation(K key)
          Get the latest operation
 long getQueueSize()
          Gets the best estimate for items in the queue still awaiting processing.
protected  java.util.List<SingleOperation<K,V>> quarantineItems()
          Quarantine items to be processed.
protected  void reinsertUnprocessedItems(java.util.List<SingleOperation<K,V>> operations)
          Reinsert any unfinished operations into the queue.
protected  void removeOperation(SingleOperation<K,V> operation)
          remove operation from map so that load hits SOR
 
Methods inherited from class org.ehcache.loaderwriter.writebehind.AbstractWriteBehindQueue
delete, load, setOperationsFilter, start, stop, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getLatestOperation

protected SingleOperation<K,V> getLatestOperation(K key)
Description copied from class: AbstractWriteBehindQueue
Get the latest operation

Specified by:
getLatestOperation in class AbstractWriteBehindQueue<K,V>

removeOperation

protected void removeOperation(SingleOperation<K,V> operation)
Description copied from class: AbstractWriteBehindQueue
remove operation from map so that load hits SOR

Specified by:
removeOperation in class AbstractWriteBehindQueue<K,V>

quarantineItems

protected java.util.List<SingleOperation<K,V>> quarantineItems()
Description copied from class: AbstractWriteBehindQueue
Quarantine items to be processed.

Specified by:
quarantineItems in class AbstractWriteBehindQueue<K,V>

addItem

protected void addItem(SingleOperation<K,V> operation)
Description copied from class: AbstractWriteBehindQueue
Add an item to the write behind queue

Specified by:
addItem in class AbstractWriteBehindQueue<K,V>

reinsertUnprocessedItems

protected void reinsertUnprocessedItems(java.util.List<SingleOperation<K,V>> operations)
Description copied from class: AbstractWriteBehindQueue
Reinsert any unfinished operations into the queue.

Specified by:
reinsertUnprocessedItems in class AbstractWriteBehindQueue<K,V>

getQueueSize

public long getQueueSize()
Description copied from class: AbstractWriteBehindQueue
Gets the best estimate for items in the queue still awaiting processing. Not including elements currently processed

Specified by:
getQueueSize in interface WriteBehind<K,V>
Specified by:
getQueueSize in class AbstractWriteBehindQueue<K,V>
Returns:
the amount of elements still awaiting processing.