|
Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.tangosol.util.Base
com.tangosol.net.cache.ReadWriteBackingMap.CacheStoreWrapper
public class ReadWriteBackingMap.CacheStoreWrapper
A wrapper around the original CacheStore to allow operations to be overridden and extended.
Nested Class Summary | |
---|---|
protected class |
ReadWriteBackingMap.CacheStoreWrapper.EraseBundler |
protected class |
ReadWriteBackingMap.CacheStoreWrapper.LoadBundler |
protected class |
ReadWriteBackingMap.CacheStoreWrapper.StoreBundler |
Constructor Summary | |
---|---|
ReadWriteBackingMap.CacheStoreWrapper(BinaryEntryStore store) Construct a CacheStoreWrapper. |
|
ReadWriteBackingMap.CacheStoreWrapper(CacheStore store) Construct a CacheStoreWrapper. |
Method Summary | |
---|---|
protected long |
calculateRequeueDelay(ReadWriteBackingMap.WriteQueue queue) Calculate the requeue delay after a store operation failed. |
AbstractBundler |
ensureEraseBundler(int cBundleThreshold) Configure the bundler for the "erase" operations. |
AbstractBundler |
ensureLoadBundler(int cBundleThreshold) Configure the bundler for the "load" operations. |
AbstractBundler |
ensureStoreBundler(int cBundleThreshold) Configure the bundler for the "store" operations. |
void |
erase(Object oKey) |
void |
eraseAll(Collection colKeys) |
protected void |
eraseAllInternal(Set setBinEntries) Same as eraseAll(java.util.Collection) , but the keys is in the internal format. |
protected void |
eraseInternal(ReadWriteBackingMap.Entry binEntry) Same as erase(java.lang.Object) , but the key is in the internal format. |
protected long |
extractExpiry(Object o) Return the expiration decoration for the given object or -1 if the given object does not have an expiration decoration. |
protected String |
formatKeys(Set setBinEntries, String sHeader) Generate a log message containing the keys from the specified set of entries. |
long |
getAverageBatchSize() Determine the average number of entries stored per store() operation. |
long |
getAverageEraseMillis() Determine the average time spent per erase() operation. |
long |
getAverageLoadMillis() Determine the average time spent per load() operation. |
long |
getAverageStoreMillis() Determine the average time spent per store() operation. |
BinaryEntryStore |
getBinaryEntryStore() The wrapped BinaryEntryStore. |
CacheStore |
getCacheStore() The wrapped CacheStore. |
AbstractBundler |
getEraseBundler() Obtain the bundler for the "erase" operations. |
long |
getEraseFailures() Determine the number of erase() failures. |
long |
getEraseMillis() Determine the cummulative time spent on erase() operations. |
long |
getEraseOps() Determine the number of erase() operations. |
AbstractBundler |
getLoadBundler() Obtain the bundler for the "load" operations. |
long |
getLoadFailures() Determine the number of load() failures. |
long |
getLoadMillis() Determine the cummulative time spent on load() operations. |
long |
getLoadOps() Determine the number of load() operations. |
AbstractBundler |
getStoreBundler() Obtain the bundler for the "store" operations. |
long |
getStoreFailures() Determine the number of store() failures. |
long |
getStoreMillis() Determine the cummulative time spent on store() operations. |
long |
getStoreOps() Determine the number of store() operations. |
boolean |
isBinaryEntryStore() |
boolean |
isEraseAllSupported() Determine if the wrapped store supports eraseAll() operations. |
boolean |
isEraseSupported() Determine if the wrapped store supports erase() operations. |
boolean |
isStoreAllSupported() Determine if the wrapped store supports storeAll() operations. |
boolean |
isStoreSupported() Determine if the wrapped store supports store() operations. |
Object |
load(Object oKey) |
Map |
loadAll(Collection colKeys) |
protected Map |
loadAllInternal(Set setBinKeys) Same as loadAll(java.util.Collection) , but the keys are in the internal format. |
protected Object |
loadInternal(Object binKey) Same as load(java.lang.Object) , but the key and the returned value are in the internal format. |
protected void |
onEraseAllFailure(Set setBinEntries, Exception e) Logs a store eraseAll() failure. |
protected void |
onEraseFailure(Object oKeyReal, Exception e) Logs a store erase() failure. |
protected void |
onLoadAllFailure(Collection colKeys, Exception e) Logs a store loadAll() failure. |
protected void |
onLoadFailure(Object oKeyReal, Exception e) Logs a store load() failure. |
protected void |
onStoreAllFailure(Set setBinEntries, Exception e) Logs a store storeAll() failure. |
protected void |
onStoreFailure(ReadWriteBackingMap.Entry entry, Exception e) Logs a store store() failure. |
protected void |
replaceInternal(ReadWriteBackingMap.Entry entry) Replace the value in the internal cache for the specified entry. |
protected void |
reportUnsupported(String sOp) Log the info about an unsupported operation. |
protected boolean |
requeue(ReadWriteBackingMap.WriteQueue queue, int cThreshold, ReadWriteBackingMap.Entry entry) Requeue the specified entry. |
void |
resetStatistics() Reset the CacheStore statistics. |
void |
setEraseAllSupported(boolean fSupported) Set the flag that determines whether or not the wrapped store supports eraseAll() operations. |
void |
setEraseSupported(boolean fSupported) Set the flag that determines whether or not the wrapped store supports erase() operations. |
void |
setStoreAllSupported(boolean fSupported) Set the flag that determines whether or not the wrapped store supports storeAll() operations. |
void |
setStoreSupported(boolean fSupported) Set the flag that determines whether or not the wrapped store supports store() operations. |
void |
store(Object oKey, Object oValue) |
void |
storeAll(Map mapEntries) |
protected void |
storeAllInternal(Set setBinEntries) Same as storeAll(java.util.Map) , but the entries are in the internal format. |
protected void |
storeInternal(ReadWriteBackingMap.Entry binEntry, boolean fAllowChange) Same as store(java.lang.Object, java.lang.Object) , but the based on the backing map entry. |
String |
toString() Return a String representation of the CacheStoreWrapper object that will be used as a part of the write-behind thread name. |
Constructor Detail |
---|
public ReadWriteBackingMap.CacheStoreWrapper(CacheStore store)
store
- the CacheStore to wrappublic ReadWriteBackingMap.CacheStoreWrapper(BinaryEntryStore store)
store
- the BinaryEntryStore to wrapMethod Detail |
---|
public AbstractBundler ensureLoadBundler(int cBundleThreshold)
cBundleThreshold
- the bundle size threshold; pass zero to disable "load" operation bundlingpublic AbstractBundler ensureStoreBundler(int cBundleThreshold)
cBundleThreshold
- the bundle size threshold; pass zero to disable "store" operation bundlingpublic AbstractBundler ensureEraseBundler(int cBundleThreshold)
cBundleThreshold
- the bundle size threshold; pass zero to disable "erase" operation bundlingpublic AbstractBundler getLoadBundler()
public AbstractBundler getStoreBundler()
public AbstractBundler getEraseBundler()
protected Object loadInternal(Object binKey)
load(java.lang.Object)
, but the key and the returned value are in the internal format.protected Map loadAllInternal(Set setBinKeys)
loadAll(java.util.Collection)
, but the keys are in the internal format. Note: this method is currently not used.protected void storeInternal(ReadWriteBackingMap.Entry binEntry, boolean fAllowChange)
store(java.lang.Object, java.lang.Object)
, but the based on the backing map entry.binEntry
- the entryfAllowChange
- if true, any changes made to the entry by the store operation should be applied to the internal cache; otherwise they will be dealt with by the callerprotected void storeAllInternal(Set setBinEntries)
storeAll(java.util.Map)
, but the entries are in the internal format.protected void eraseInternal(ReadWriteBackingMap.Entry binEntry)
erase(java.lang.Object)
, but the key is in the internal format.protected void eraseAllInternal(Set setBinEntries)
eraseAll(java.util.Collection)
, but the keys is in the internal format. Note: this method is currently not used.protected void replaceInternal(ReadWriteBackingMap.Entry entry)
entry
- the entry that holds the binary value to replacepublic Object load(Object oKey)
public Map loadAll(Collection colKeys)
public void store(Object oKey, Object oValue)
public void storeAll(Map mapEntries)
public void erase(Object oKey)
public void eraseAll(Collection colKeys)
protected long extractExpiry(Object o)
o
- the decorated objectpublic long getLoadOps()
public long getLoadFailures()
public long getLoadMillis()
public long getStoreOps()
public long getStoreFailures()
public long getStoreMillis()
public long getEraseOps()
public long getEraseFailures()
public long getEraseMillis()
public long getAverageBatchSize()
public long getAverageLoadMillis()
public long getAverageStoreMillis()
public long getAverageEraseMillis()
public void resetStatistics()
public CacheStore getCacheStore()
public BinaryEntryStore getBinaryEntryStore()
public boolean isBinaryEntryStore()
public boolean isStoreSupported()
public void setStoreSupported(boolean fSupported)
fSupported
- the new value of the flagpublic boolean isStoreAllSupported()
public void setStoreAllSupported(boolean fSupported)
fSupported
- the new value of the flagpublic boolean isEraseSupported()
public void setEraseSupported(boolean fSupported)
fSupported
- the new value of the flagpublic boolean isEraseAllSupported()
public void setEraseAllSupported(boolean fSupported)
fSupported
- the new value of the flagprotected void onLoadFailure(Object oKeyReal, Exception e)
oKeyReal
- the keye
- the exceptionprotected void onLoadAllFailure(Collection colKeys, Exception e)
colKeys
- colKeys a collection of keys in external form to loade
- the exceptionprotected void onStoreFailure(ReadWriteBackingMap.Entry entry, Exception e)
entry
-e
- the exceptionprotected void onStoreAllFailure(Set setBinEntries, Exception e)
setBinEntries
- set of Entries
e
- the exceptionprotected boolean requeue(ReadWriteBackingMap.WriteQueue queue, int cThreshold, ReadWriteBackingMap.Entry entry)
queue
- the queue (never null)cThreshold
- the queue size thresholdentry
- the entry to reqeueprotected long calculateRequeueDelay(ReadWriteBackingMap.WriteQueue queue)
queue
- the write-behind queueprotected void onEraseFailure(Object oKeyReal, Exception e)
oKeyReal
- the keye
- the exceptionprotected void onEraseAllFailure(Set setBinEntries, Exception e)
setBinEntries
- set of Entries
e
- the exceptionprotected void reportUnsupported(String sOp)
protected String formatKeys(Set setBinEntries, String sHeader)
setBinEntries
- set of Entries
sHeader
- message headerpublic String toString()
|
Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |