Class BundlingNamedCache
- All Implemented Interfaces:
CacheMap, NamedCache, NamedCollection, NamedMap, Releasable, ConcurrentMap, InvocableMap, ObservableMap, QueryMap, AutoCloseable, Map
Bundling NamedCache implementation.
- Since:
- Coherence 3.3
- Author:
- gg 2007.02.13
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classprotected classprotected classNested classes/interfaces inherited from class WrapperConcurrentMap
WrapperConcurrentMap.LockNested classes/interfaces inherited from class WrapperObservableMap
WrapperObservableMap.InternalListenerNested classes/interfaces inherited from class AbstractKeySetBasedMap
AbstractKeySetBasedMap.EntrySet, AbstractKeySetBasedMap.KeyIterator, AbstractKeySetBasedMap.KeySet, AbstractKeySetBasedMap.ValuesCollectionNested classes/interfaces inherited from class AbstractKeyBasedMap
AbstractKeyBasedMap.DeferredCacheEvent<K,V> Nested classes/interfaces inherited from class Base
Base.LoggingWriterNested classes/interfaces inherited from interface InvocableMap
InvocableMap.Entry<K,V>, InvocableMap.EntryAggregator<K, V, R>, InvocableMap.EntryProcessor<K, V, R>, InvocableMap.ParallelAwareAggregator<K, V, P, R>, InvocableMap.StreamingAggregator<K, V, P, R> Nested classes/interfaces inherited from interface NamedMap
NamedMap.OptionNested classes/interfaces inherited from interface QueryMap
QueryMap.Entry<K,V> -
Field Summary
Fields inherited from class WrapperNamedCache
m_service, m_sNameFields inherited from class WrapperConcurrentMap
m_cWaitMillis, m_fEnforceLocking, m_gateMap, m_mapLockFields inherited from class WrapperObservableMap
m_fDeferredEvent, m_fTranslateEvents, m_listenerInternal, m_listenerSupport, m_map, m_statsFields inherited from class Base
DEFAULT_LOAD_FACTOR, LOG_ALWAYS, LOG_CONFIG, LOG_DEBUG, LOG_ERR, LOG_INFO, LOG_MAX, LOG_MIN, LOG_QUIET, LOG_WARN, POWER_0, POWER_G, POWER_K, POWER_M, POWER_T, UNIT_D, UNIT_H, UNIT_M, UNIT_MS, UNIT_NS, UNIT_S, UNIT_USFields inherited from interface CacheMap
EXPIRY_DEFAULT, EXPIRY_NEVERFields inherited from interface ConcurrentMap
LOCK_ALL -
Constructor Summary
ConstructorsConstructorDescriptionBundlingNamedCache(NamedCache cache) Construct a BundlingNamedCache based on the specified NamedCache. -
Method Summary
Modifier and TypeMethodDescriptionensureGetBundler(int cBundleThreshold) Configure the bundler for the "get" operations.ensurePutBundler(int cBundleThreshold) Configure the bundler for the "put" operations.ensureRemoveBundler(int cBundleThreshold) Configure the bundler for the "remove" operations.Returns the value to which this map maps the specified key.getAll(Collection colKeys) Get all the specified keys, if they are in the Map.Obtain the bundler for the "get" operations.Obtain the bundler for the "put" operations.Obtain the bundler for the "remove" operations.Associates the specified value with the specified key in this map.voidCopies all of the mappings from the specified map to this map.Removes the mapping for this key from this map if present.Methods inherited from class WrapperNamedCache
addIndex, aggregate, aggregate, destroy, entrySet, entrySet, getCacheName, getCacheService, invoke, invokeAll, invokeAll, isActive, isDestroyed, isReady, isReleased, keySet, put, release, removeIndex, truncateMethods inherited from class WrapperConcurrentMap
clear, getDescription, getLockDescription, getWaitMillis, instantiateLock, isInternalKeySetIteratorMutable, isLockingEnforced, lock, lock, removeBlind, setLockingEnforced, setWaitMillis, toString, unlockMethods inherited from class WrapperObservableMap
addMapListener, addMapListener, addMapListener, containsValue, dispatchEvent, dispatchPendingEvent, ensureInternalListener, ensureMapListenerSupport, equals, getCacheStatistics, getInternalKeySet, getMap, getMapListenerSupport, hashCode, hasListeners, instantiateInternalListener, isCollectStats, isEventFabricator, isSynthetic, isTranslateEvents, removeMapListener, removeMapListener, removeMapListener, setCollectStats, setTranslateEventsMethods inherited from class AbstractKeySetBasedMap
containsKey, instantiateEntrySet, instantiateKeyIterator, instantiateKeySet, instantiateValues, isEmpty, iterateKeys, sizeMethods inherited from class AbstractKeyBasedMap
clone, entrySet, keySet, valuesMethods inherited from class 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, newHashMap, newHashMap, newHashSet, newHashSet, 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, waitMethods inherited from interface ConcurrentMap
containsKey, containsValue, isEmpty, lock, lock, size, unlockMethods inherited from interface InvocableMap
addAggregator, addAggregator, aggregate, compute, compute, computeIfAbsent, computeIfAbsent, computeIfPresent, computeIfPresent, getOrDefault, invokeAll, merge, merge, putIfAbsent, remove, removeAggregator, replace, replace, replaceAll, replaceAll, replaceAll, replaceAll, stream, stream, stream, stream, stream, streamMethods inherited from interface NamedMap
clear, getName, getServiceMethods inherited from interface ObservableMap
addMapListener, addMapListener, addMapListener, removeMapListener, removeMapListener, removeMapListenerMethods inherited from interface Releasable
close
-
Constructor Details
-
BundlingNamedCache
Construct a BundlingNamedCache based on the specified NamedCache.- Parameters:
cache- the NamedCache that will be wrapped by this BundlingNamedCache
-
-
Method Details
-
ensureGetBundler
Configure the bundler for the "get" operations. If the bundler does not exist and bundling is enabled, it will be instantiated.- Parameters:
cBundleThreshold- the bundle size threshold; pass zero to disable "get" operation bundling- Returns:
- the "get" bundler or null if bundling is disabled
-
ensurePutBundler
Configure the bundler for the "put" operations. If the bundler does not exist and bundling is enabled, it will be instantiated.- Parameters:
cBundleThreshold- the bundle size threshold; pass zero to disable "put" operation bundling- Returns:
- the "put" bundler or null if bundling is disabled
-
ensureRemoveBundler
Configure the bundler for the "remove" operations. If the bundler does not exist and bundling is enabled, it will be instantiated.- Parameters:
cBundleThreshold- the bundle size threshold; pass zero to disable "remove" operation bundling- Returns:
- the "remove" bundler or null if bundling is disabled
-
getGetBundler
Obtain the bundler for the "get" operations.- Returns:
- the "get" bundler
-
getPutBundler
Obtain the bundler for the "put" operations.- Returns:
- the "put" bundler
-
getRemoveBundler
Obtain the bundler for the "remove" operations.- Returns:
- the "remove" bundler
-
get
Returns the value to which this map maps the specified key.- Specified by:
getin interfaceConcurrentMap- Specified by:
getin interfaceMap- Overrides:
getin classWrapperObservableMap- Parameters:
oKey- the key object- Returns:
- the value to which this map maps the specified key, or null if the map contains no mapping for this key
- See Also:
-
getAll
Get all the specified keys, if they are in the Map. For each key that is in the cache, that key and its corresponding value will be placed in the map that is returned by this method. The absence of a key in the returned map indicates that it was not in the cache, which may imply (for caches that can load behind the scenes) that the requested data could not be loaded. -
put
Associates the specified value with the specified key in this map.Note: this method always returns null.
- Specified by:
putin interfaceCacheMap- Specified by:
putin interfaceConcurrentMap- Specified by:
putin interfaceMap- Overrides:
putin classWrapperConcurrentMap- Parameters:
oKey- key with which the specified value is to be associatedoValue- value to be associated with the specified key- Returns:
- previous value associated with specified key, or null if there was no mapping for key
-
putAll
Copies all of the mappings from the specified map to this map. The effect of this call is equivalent to that of callingAbstractKeyBasedMap.put(K, V)on this map once for each mapping in the passed map. The behavior of this operation is unspecified if the passed map is modified while the operation is in progress.- Specified by:
putAllin interfaceConcurrentMap- Specified by:
putAllin interfaceMap- Overrides:
putAllin classWrapperConcurrentMap- Parameters:
map- the Map containing the key/value pairings to put into this Map
-
remove
Removes the mapping for this key from this map if present. Expensive: updates both the underlying cache and the local cache.Note: this method always returns null.
- Specified by:
removein interfaceConcurrentMap- Specified by:
removein interfaceMap- Overrides:
removein classWrapperConcurrentMap- Parameters:
oKey- key whose mapping is to be removed from the map- Returns:
- previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the map previously associated null with the specified key, if the implementation supports null values.
-