|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ehcache.loaderwriter.writebehind.AbstractWriteBehindQueue<K,V>
public abstract class AbstractWriteBehindQueue<K,V>
Constructor Summary | |
---|---|
AbstractWriteBehindQueue(WriteBehindConfiguration config,
CacheLoaderWriter<K,V> cacheLoaderWriter)
|
Method Summary | |
---|---|
protected abstract void |
addItem(SingleOperation<K,V> operation)
Add an item to the write behind queue |
void |
delete(K key)
Deletes a single entry from the underlying system of record. |
protected abstract SingleOperation<K,V> |
getLatestOperation(K key)
Get the latest operation |
abstract long |
getQueueSize()
Gets the best estimate for items in the queue still awaiting processing. |
V |
load(K key)
Loads the value to be associated with the given key in the Cache using this
CacheLoaderWriter instance. |
protected abstract java.util.List<SingleOperation<K,V>> |
quarantineItems()
Quarantine items to be processed. |
protected abstract void |
reinsertUnprocessedItems(java.util.List<SingleOperation<K,V>> operations)
Reinsert any unfinished operations into the queue. |
protected abstract void |
removeOperation(SingleOperation<K,V> operation)
remove operation from map so that load hits SOR |
void |
setOperationsFilter(OperationsFilter<SingleOperation<K,V>> filter)
Set the operations filter that should be used. |
void |
start()
Start the write behind queue |
void |
stop()
Stop the coordinator and all the internal data structures. |
void |
write(K key,
V value)
Writes a single entry to the underlying system of record, maybe a brand new value or an update to an existing value |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractWriteBehindQueue(WriteBehindConfiguration config, CacheLoaderWriter<K,V> cacheLoaderWriter)
Method Detail |
---|
protected abstract java.util.List<SingleOperation<K,V>> quarantineItems()
protected abstract void addItem(SingleOperation<K,V> operation)
protected abstract void reinsertUnprocessedItems(java.util.List<SingleOperation<K,V>> operations)
protected abstract SingleOperation<K,V> getLatestOperation(K key)
protected abstract void removeOperation(SingleOperation<K,V> operation)
public void start()
WriteBehind
start
in interface WriteBehind<K,V>
public V load(K key) throws java.lang.Exception
WriteBehind
Cache
using this
CacheLoaderWriter
instance.
load
in interface WriteBehind<K,V>
key
- the key that will map to the value
returned
java.lang.Exception
public void write(K key, V value) throws CacheWritingException
WriteBehind
write
in interface WriteBehind<K,V>
CacheWritingException
public void delete(K key) throws CacheWritingException
WriteBehind
delete
in interface WriteBehind<K,V>
CacheWritingException
public void stop()
WriteBehind
stop
in interface WriteBehind<K,V>
public void setOperationsFilter(OperationsFilter<SingleOperation<K,V>> filter)
WriteBehind
setOperationsFilter
in interface WriteBehind<K,V>
filter
- the filter that will be used as of nowpublic abstract long getQueueSize()
getQueueSize
in interface WriteBehind<K,V>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |