Top Description Fields Constructors Methods
net.sf.ehcache.writer.writebehind

pack-priv Class WriteBehindQueue

extends AbstractWriteBehindQueue
Class Inheritance
Imports
java.util.ArrayList, .List, net.sf.ehcache.config.CacheConfiguration, net.sf.ehcache.writer.writebehind.operations.SingleOperation

An implementation of write behind with a queue that is kept in non durable local heap.
Author
Geert Bevin
Version
$Id: WriteBehindQueue.java 5793 2012-06-13 23:53:16Z twu $

Field Summary

Modifier and TypeField and Description
private List<SingleOperation>

Constructor Summary

AccessConstructor and Description
pack-priv
WriteBehindQueue(CacheConfiguration config)

Construct a simple list backed write behind queue.

Method Summary

Modifier and TypeMethod and Description
protected void
addItem(SingleOperation
operation to be done
operation
)

Implements abstract net.sf.ehcache.writer.writebehind.AbstractWriteBehindQueue.addItem.

Add an item to the write behind queue
public long
getQueueSize()

Implements abstract net.sf.ehcache.writer.writebehind.AbstractWriteBehindQueue.getQueueSize.

Implements net.sf.ehcache.writer.writebehind.WriteBehind.getQueueSize.

Gets the best estimate for items in the queue still awaiting processing.
protected List<SingleOperation>
protected void
reinsertUnprocessedItems(List<SingleOperation>
list of unfinished operations
operations
)

Implements abstract net.sf.ehcache.writer.writebehind.AbstractWriteBehindQueue.reinsertUnprocessedItems.

Reinsert any unfinished operations into the queue.
Inherited from net.sf.ehcache.writer.writebehind.AbstractWriteBehindQueue:
deletegetProcessingThreadsetOperationsFilterstartstopwrite

Field Detail

waitingback to summary
private List<SingleOperation> waiting

Constructor Detail

WriteBehindQueueback to summary
pack-priv WriteBehindQueue(CacheConfiguration config)

Construct a simple list backed write behind queue.

Method Detail

addItemback to summary
protected void addItem(SingleOperation operation)

Implements abstract net.sf.ehcache.writer.writebehind.AbstractWriteBehindQueue.addItem.

Doc from net.sf.ehcache.writer.writebehind.AbstractWriteBehindQueue.addItem.

Add an item to the write behind queue

Parameters
operation:SingleOperation

operation to be done

Annotations
@Override
getQueueSizeback to summary
public long getQueueSize()

Implements abstract net.sf.ehcache.writer.writebehind.AbstractWriteBehindQueue.getQueueSize.

Implements net.sf.ehcache.writer.writebehind.WriteBehind.getQueueSize.

Doc from net.sf.ehcache.writer.writebehind.AbstractWriteBehindQueue.getQueueSize.

Gets the best estimate for items in the queue still awaiting processing. Not including elements currently processed

Returns:long

the amount of elements still awaiting processing.

Annotations
@Override
quarantineItemsback to summary
protected List<SingleOperation> quarantineItems()

Implements abstract net.sf.ehcache.writer.writebehind.AbstractWriteBehindQueue.quarantineItems.

Doc from net.sf.ehcache.writer.writebehind.AbstractWriteBehindQueue.quarantineItems.

Quarantine items to be processed.

Returns:List<SingleOperation>

list of operations

Annotations
@Override
reinsertUnprocessedItemsback to summary
protected void reinsertUnprocessedItems(List<SingleOperation> operations)

Implements abstract net.sf.ehcache.writer.writebehind.AbstractWriteBehindQueue.reinsertUnprocessedItems.

Doc from net.sf.ehcache.writer.writebehind.AbstractWriteBehindQueue.reinsertUnprocessedItems.

Reinsert any unfinished operations into the queue.

Parameters
operations:List<SingleOperation>

list of unfinished operations

Annotations
@Override