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

public Interface WriteBehind

Known Direct Implementers
net.sf.ehcache.writer.writebehind.WriteBehindQueueManager, net.sf.ehcache.writer.writebehind.AbstractWriteBehindQueue, net.sf.ehcache.writer.writebehind.NonStopWriteBehind
Imports
net.sf.ehcache.CacheEntry, .CacheException, .Element, net.sf.ehcache.writer.CacheWriter

An interface for write behind behavior.
Author
Geert Bevin
Version
$Id: WriteBehind.java 10789 2018-04-26 02:08:13Z adahanne $

Method Summary

Modifier and TypeMethod and Description
public void
delete(CacheEntry
the cache entry for which a delete operation will be added to the write behind queue
entry
)

Add a delete operation for the given cache entry

public long

Returns:

the amount of elements still awaiting processing.
getQueueSize
()

Gets the best estimate for items in the queue still awaiting processing.

public void
setOperationsFilter(OperationsFilter<T>
the filter that will be used as of now
filter
)

Set the operations filter that should be used.

public void
start(CacheWriter
the cache writer that should be used to process the operations
writer
)

Start the write behind queue with a cache writer

public void
stop()

Stop the coordinator and all the internal data structures.

public void
write(Element
the element for which a write operation will be added to the write behind queue
element
)

Add a write operation for a given element.

Method Detail

deleteback to summary
public void delete(CacheEntry entry)

Add a delete operation for the given cache entry

Parameters
entry:CacheEntry

the cache entry for which a delete operation will be added to the write behind queue

getQueueSizeback to summary
public long 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.

setOperationsFilterback to summary
public void setOperationsFilter(OperationsFilter<T> filter)

Set the operations filter that should be used.

Parameters
filter:OperationsFilter<T>

the filter that will be used as of now

startback to summary
public void start(CacheWriter writer) throws CacheException

Start the write behind queue with a cache writer

Parameters
writer:CacheWriter

the cache writer that should be used to process the operations

See Also
stop
stopback to summary
public void stop() throws CacheException

Stop the coordinator and all the internal data structures.

This stops as quickly as possible without losing any previously added items. However, no guarantees are made towards the processing of these items. It's highly likely that items are still inside the internal data structures and not processed.

See Also
start
writeback to summary
public void write(Element element)

Add a write operation for a given element.

Parameters
element:Element

the element for which a write operation will be added to the write behind queue