Package com.tangosol.net.partition
Class ObservableSplittingBackingCache.CapacityAwareMap
- java.lang.Object
-
- com.tangosol.util.Base
-
- com.tangosol.util.AbstractKeyBasedMap
-
- com.tangosol.net.partition.PartitionSplittingBackingMap
-
- com.tangosol.net.partition.ObservableSplittingBackingCache.CapacityAwareMap
-
- All Implemented Interfaces:
Disposable
,PartitionAwareBackingMap
,AutoCloseable
,Map
- Enclosing class:
- ObservableSplittingBackingCache
protected static class ObservableSplittingBackingCache.CapacityAwareMap extends PartitionSplittingBackingMap
A subclass of PartitionSplittingBackingMap which allows an injected instance ofObservableSplittingBackingMap
to be called immediately before inserting a value(s) in a partition map.This class is intended for internal use only facilitating efficient use of PartitionSplittingBackingMap, by reducing the number of times the partitioned backing map is determined.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.tangosol.net.partition.PartitionSplittingBackingMap
PartitionSplittingBackingMap.AggregatingCacheStatistics, PartitionSplittingBackingMap.KeySet, PartitionSplittingBackingMap.MapArray, PartitionSplittingBackingMap.MaskedPartitionMap, PartitionSplittingBackingMap.PartitionedIterator
-
Nested classes/interfaces inherited from class com.tangosol.util.AbstractKeyBasedMap
AbstractKeyBasedMap.DeferredCacheEvent<K,V>, AbstractKeyBasedMap.EntrySet, AbstractKeyBasedMap.ValuesCollection
-
Nested classes/interfaces inherited from class com.tangosol.util.Base
Base.LoggingWriter
-
-
Field Summary
Fields Modifier and Type Field Description protected ObservableSplittingBackingCache
m_mapOuter
The ObservableSplittingBackingMap used to call prepareUpdate.
-
Constructor Summary
Constructors Modifier Constructor Description protected
CapacityAwareMap(BackingMapManager bmm, String sName)
Create a CapacityAwareMap.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
bind(ObservableSplittingBackingCache mapOuter)
Bind to the givenObservableSplittingBackingMap
instance.protected void
putAllInternal(Map mapPart, Map map)
Put all entries in mapUpdate into the provided map.protected Object
putInternal(Map mapPart, Object oKey, Object oValue)
Put the key and value into a map representing a given partition.-
Methods inherited from class com.tangosol.net.partition.PartitionSplittingBackingMap
clear, containsKey, createPartition, destroyPartition, dispose, get, getBackingMap, getBackingMapManager, getCacheStatistics, getContext, getMapArray, getName, getPartitionMap, getPartitionMap, instantiateKeySet, isEmpty, isEmpty, isStrict, iterateKeys, iterateKeys, makeName, put, putAll, remove, removeBlind, reportMissingPartition, setStrict, size, size, toString, toString
-
Methods inherited from class com.tangosol.util.AbstractKeyBasedMap
clone, containsValue, entrySet, equals, getAll, hashCode, instantiateEntrySet, instantiateValues, keySet, values
-
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
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.oracle.coherence.common.base.Disposable
close
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsValue, entrySet, equals, forEach, getOrDefault, hashCode, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, values
-
-
-
-
Field Detail
-
m_mapOuter
protected ObservableSplittingBackingCache m_mapOuter
The ObservableSplittingBackingMap used to call prepareUpdate.
-
-
Constructor Detail
-
CapacityAwareMap
protected CapacityAwareMap(BackingMapManager bmm, String sName)
Create a CapacityAwareMap.- Parameters:
bmm
- a BackingMapManager that knows how to create and release the backing maps that this PartitionSplittingBackingMap is responsible forsName
- the cache name for which this backing map exists
-
-
Method Detail
-
putInternal
protected Object putInternal(Map mapPart, Object oKey, Object oValue)
Put the key and value into a map representing a given partition.- Overrides:
putInternal
in classPartitionSplittingBackingMap
- Parameters:
mapPart
- a partition mapoKey
- oKey with which the specified value is to be associatedoValue
- oValue to be associated with the specified oKey- Returns:
- previous value associated with specified key, or null if there was no mapping for the key
-
putAllInternal
protected void putAllInternal(Map mapPart, Map map)
Put all entries in mapUpdate into the provided map.- Overrides:
putAllInternal
in classPartitionSplittingBackingMap
- Parameters:
mapPart
- a partition mapmap
- the Map containing the key/value pairings to put into mapPart
-
bind
protected void bind(ObservableSplittingBackingCache mapOuter)
Bind to the givenObservableSplittingBackingMap
instance. This instance will haveprepareUpdate
invoked immediately prior to an insert to a partition map.- Parameters:
mapOuter
- the map used to callprepareUpdate
-
-