Package com.tangosol.net.cache
Class ReadWriteBackingMap.CacheLoaderCacheStore
- java.lang.Object
-
- com.tangosol.util.Base
-
- com.tangosol.net.cache.AbstractCacheLoader<K,V>
-
- com.tangosol.net.cache.AbstractCacheStore
-
- com.tangosol.net.cache.ReadWriteBackingMap.CacheLoaderCacheStore
-
- All Implemented Interfaces:
CacheLoader
,CacheStore
- Enclosing class:
- ReadWriteBackingMap
public static class ReadWriteBackingMap.CacheLoaderCacheStore extends AbstractCacheStore
A CacheStore wrapped around a CacheLoader.- Author:
- cp 2002.06.04
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.tangosol.util.Base
Base.LoggingWriter
-
-
Constructor Summary
Constructors Constructor Description CacheLoaderCacheStore(CacheLoader loader)
Construct a CacheLoaderCacheStore.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CacheLoader
getCacheLoader()
The wrapped CacheLoader.Object
load(Object oKey)
Return the value associated with the specified key, or null if the key does not have an associated value in the underlying store.Map
loadAll(Collection colKeys)
Return the values associated with each the specified keys in the passed collection.-
Methods inherited from class com.tangosol.net.cache.AbstractCacheStore
erase, store
-
Methods inherited from class com.tangosol.util.Base
azzert, azzert, azzert, azzertFailed, breakLines, breakLines, capitalize, checkNotEmpty, checkNotNull, checkRange, computeSafeWaitTime, decimalValue, dup, dup, ensureBigDecimal, ensureClassLoader, ensureRuntimeException, ensureRuntimeException, equals, equalsDeep, err, err, err, err, err, escape, formatDateTime, getCallerStackFrame, getCommonMonitor, getCommonMonitor, getCommonMonitor, getContextClassLoader, getContextClassLoader, getDeepMessage, getErr, getLastSafeTimeMillis, getLog, getMaxDecDigits, getMaxHexDigits, getOriginalException, getOut, getProcessRandom, getRandom, getRandomBinary, getRandomBinary, getRandomString, getSafeTimeMillis, getStackFrame, getStackFrames, getStackTrace, getStackTrace, getStackTrace, getThreadFactory, getTimeZone, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, mergeArray, mergeBooleanArray, mergeByteArray, mergeCharArray, mergeDoubleArray, mergeFloatArray, mergeIntArray, mergeLongArray, mod, mod, octalValue, out, out, out, out, out, pad, parseBandwidth, parseBandwidth, parseDelimitedString, parseHex, parseHex, parseMemorySize, parseMemorySize, parsePercentage, parseTime, parseTime, parseTimeNanos, parseTimeNanos, printStackTrace, randomize, randomize, randomize, randomize, read, read, read, read, read, read, read, replace, setErr, setLog, setLogEcho, setOut, sleep, toBandwidthString, toBandwidthString, toCharEscape, toCrc, toCrc, toCrc, toCrc, toCrc, toDecString, toDelimitedString, toDelimitedString, toDelimitedString, toDelimitedString, toHex, toHex, toHexDump, toHexEscape, toHexEscape, toHexEscape, toHexEscape, toHexString, toMemorySizeString, toMemorySizeString, toQuotedCharEscape, toQuotedStringEscape, toSqlString, toString, toString, toStringEscape, toUnicodeEscape, trace, trace, trace, trace, trace, trace, trace, trace, trace, truncateString, truncateString, wait
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.tangosol.net.cache.CacheStore
eraseAll, storeAll
-
-
-
-
Constructor Detail
-
CacheLoaderCacheStore
public CacheLoaderCacheStore(CacheLoader loader)
Construct a CacheLoaderCacheStore.- Parameters:
loader
- the CacheLoader to wrap
-
-
Method Detail
-
load
public Object load(Object oKey)
Return the value associated with the specified key, or null if the key does not have an associated value in the underlying store.- Specified by:
load
in interfaceCacheLoader
- Specified by:
load
in classAbstractCacheLoader
- Parameters:
oKey
- key whose associated value is to be returned- Returns:
- the value associated with the specified key, or null if no value is available for that key
-
loadAll
public Map loadAll(Collection colKeys)
Return the values associated with each the specified keys in the passed collection. If a key does not have an associated value in the underlying store, then the return map will not have an entry for that key.The default implementation of this method calls
CacheLoader.load(K)
for each key in the supplied Collection. Implementations that can optimize multi-key operationsshould
override this default implementation.- Parameters:
colKeys
- a collection of keys to load- Returns:
- a Map of keys to associated values for the specified keys
-
getCacheLoader
protected CacheLoader getCacheLoader()
The wrapped CacheLoader.- Returns:
- the underlying CacheLoader that this CacheStore wraps
-
-