public class ReadWriteSplittingBackingMap extends ReadWriteBackingMap implements PartitionAwareBackingMap
ReadWriteBackingMap.BinaryEntryStoreWrapper, ReadWriteBackingMap.CacheLoaderCacheStore, ReadWriteBackingMap.CacheStoreWrapper, ReadWriteBackingMap.Entry, ReadWriteBackingMap.EntrySet, ReadWriteBackingMap.EvictingBackupMap, ReadWriteBackingMap.InternalMapListener, ReadWriteBackingMap.KeySet, ReadWriteBackingMap.ReadLatch, ReadWriteBackingMap.ReadQueue, ReadWriteBackingMap.ReadThread, ReadWriteBackingMap.StoreWrapper, ReadWriteBackingMap.ValuesCollection, ReadWriteBackingMap.WriteQueue, ReadWriteBackingMap.WriteThread
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
BIN_ERASE_PENDING, BIN_STORE_PENDING, GUARD_RECOVERY, m_listenerSupport, MIN_REQUEUE_DELAY, PROP_WB_REMOVE_DEFAULT, REMOVED, RWBM_WB_REMOVE_DEFAULT
EXPIRY_DEFAULT, EXPIRY_NEVER
Constructor and Description |
---|
ReadWriteSplittingBackingMap(BackingMapManagerContext ctxService,
PartitionAwareBackingMap mapInternal,
Map mapMisses,
BinaryEntryStore storeBinary,
boolean fReadOnly,
int cWriteBehindSeconds,
double dflRefreshAheadFactor)
Construct a ReadWriteSplittingBackingMap based on a BinaryEntryStore.
|
ReadWriteSplittingBackingMap(BackingMapManagerContext ctxService,
PartitionAwareBackingMap mapInternal,
Map mapMisses,
BinaryEntryStore storeBinary,
boolean fReadOnly,
int cWriteBehindSeconds,
double dflRefreshAheadFactor,
boolean fWriteBehindRemove)
Construct a ReadWriteSplittingBackingMap based on a BinaryEntryStore.
|
ReadWriteSplittingBackingMap(BackingMapManagerContext ctxService,
PartitionAwareBackingMap mapInternal,
Map mapMisses,
CacheLoader loader,
boolean fReadOnly,
int cWriteBehindSeconds,
double dflRefreshAheadFactor)
Construct a ReadWriteSplittingBackingMap based on a CacheStore.
|
ReadWriteSplittingBackingMap(BackingMapManagerContext ctxService,
PartitionAwareBackingMap mapInternal,
Map mapMisses,
CacheLoader loader,
boolean fReadOnly,
int cWriteBehindSeconds,
double dflRefreshAheadFactor,
boolean fWriteBehindRemove)
Construct a ReadWriteSplittingBackingMap based on a CacheStore.
|
Modifier and Type | Method and Description |
---|---|
void |
createPartition(int nPid)
Add a partition to the PartitionAwareBackingMap.
|
void |
destroyPartition(int nPid)
Remove a partition from the PartitionAwareBackingMap.
|
BackingMapManager |
getBackingMapManager()
Obtain the BackingMapManager that this PartitionAwareBackingMap uses to
instantiate and release backing maps.
|
String |
getName()
Determine the name of the cache for which this PartitionAwareBackingMap
exists.
|
PartitionAwareBackingMap |
getPartitionAwareBackingMap()
Obtain the PartitionAwareBackingMap that this ReadWriteBackingMap
uses as its backing map.
|
Map |
getPartitionMap(int nPid)
Obtain a Map view for the data in a specific partition.
|
Map |
getPartitionMap(PartitionSet partitions)
Obtain a Map view for the data in a specific set of partitions.
|
addMapListener, addMapListener, addMapListener, cancelOutstandingReads, clear, configureCacheStore, configureInternalCache, configureReadThread, configureWriteThread, containsKey, containsValue, entrySet, equals, extractExpiry, flush, flush, get, getAll, getCachedOrPending, getCacheService, getCacheStore, getCacheStoreTimeoutMillis, getContext, getControlMap, getFromInternalCache, getInternalCache, getInternalConfigurableCache, getInternalListener, getMissesCache, getPendingRemoves, getReadQueue, getReadThread, getRefreshAheadFactor, getSyntheticEventsMap, getWriteBatchFactor, getWriteBehindMillis, getWriteBehindSeconds, getWriteMaxBatchSize, getWriteQueue, getWriteRequeueThreshold, getWriteThread, hashCode, heartbeat, instantiateCacheLoaderCacheStore, instantiateCacheStoreWrapper, instantiateCacheStoreWrapper, instantiateControlMap, instantiateEntry, instantiateEntry, instantiateEntrySet, instantiateInternalListener, instantiateKeySet, instantiateReadLatch, instantiateReadQueue, instantiateReadThread, instantiateValuesCollection, instantiateWriteQueue, instantiateWriteThread, isActive, isReadOnly, isRefreshAhead, isRethrowExceptions, isWriteBehind, isWriteBehindRemove, isWriteThrough, keySet, put, put, putAll, putInternal, putToInternalCache, putToInternalCache, putToInternalCache, putToInternalMap, release, remove, removeFromWriteQueue, removeInternal, removeMapListener, removeMapListener, removeMapListener, setCacheName, setCacheStoreTimeoutMillis, setRefreshAheadFactor, setRethrowExceptions, setWriteBatchFactor, setWriteBehindMillis, setWriteBehindSeconds, setWriteMaxBatchSize, setWriteRequeueThreshold, size, terminateReadThread, terminateWriteThread, toString, updateThreadName, values, waitFor
clone, isEmpty
finalize, getClass, notify, notifyAll, wait, wait, wait
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
public ReadWriteSplittingBackingMap(BackingMapManagerContext ctxService, PartitionAwareBackingMap mapInternal, Map mapMisses, CacheLoader loader, boolean fReadOnly, int cWriteBehindSeconds, double dflRefreshAheadFactor)
ctxService
- the context provided by the CacheService
which is using this backing mapmapInternal
- the PartitionAwareBackingMap used to store
the data internally in this backing map;
it must implement the ObservableMap
interfacemapMisses
- the Map used to cache CacheStore misses
(optional)loader
- the CacheLoader responsible for the
persistence of the cached data (optional)fReadOnly
- pass true is the specified loader is in
fact a CacheStore that needs to be used
only for read operations; changes to the
cache will not be persistedcWriteBehindSeconds
- number of seconds to write if there is a
CacheStore; zero disables write-behind
caching, which (combined with !fReadOnly)
implies write-throughdflRefreshAheadFactor
- the interval before an entry expiration
time (expressed as a percentage of the
internal cache expiration interval) during
which an asynchronous load request for the
entry will be scheduled; zero disables
refresh-ahead; only applicable when
the mapInternal parameter is an
instance of
LocalCache
public ReadWriteSplittingBackingMap(BackingMapManagerContext ctxService, PartitionAwareBackingMap mapInternal, Map mapMisses, CacheLoader loader, boolean fReadOnly, int cWriteBehindSeconds, double dflRefreshAheadFactor, boolean fWriteBehindRemove)
ctxService
- the context provided by the CacheService
which is using this backing mapmapInternal
- the PartitionAwareBackingMap used to store
the data internally in this backing map;
it must implement the ObservableMap
interfacemapMisses
- the Map used to cache CacheStore misses
(optional)loader
- the CacheLoader responsible for the
persistence of the cached data (optional)fReadOnly
- pass true is the specified loader is in
fact a CacheStore that needs to be used
only for read operations; changes to the
cache will not be persistedcWriteBehindSeconds
- number of seconds to write if there is a
CacheStore; zero disables write-behind
caching, which (combined with !fReadOnly)
implies write-throughdflRefreshAheadFactor
- the interval before an entry expiration
time (expressed as a percentage of the
internal cache expiration interval) during
which an asynchronous load request for the
entry will be scheduled; zero disables
refresh-ahead; only applicable when
the mapInternal parameter is an
instance of
LocalCache
fWriteBehindRemove
- pass true if the specified loader is in fact
a CacheStore that needs to apply write-behind to removepublic ReadWriteSplittingBackingMap(BackingMapManagerContext ctxService, PartitionAwareBackingMap mapInternal, Map mapMisses, BinaryEntryStore storeBinary, boolean fReadOnly, int cWriteBehindSeconds, double dflRefreshAheadFactor)
ctxService
- the context provided by the CacheService
which is using this backing mapmapInternal
- the PartitionAwareBackingMap used to store
the data internally in this backing map;
it must implement the ObservableMap
interfacemapMisses
- the Map used to cache CacheStore misses
(optional)storeBinary
- the BinaryEntryStore responsible for the
persistence of the cached data (optional)fReadOnly
- pass true is the specified loader is in
fact a CacheStore that needs to be used
only for read operations; changes to the
cache will not be persistedcWriteBehindSeconds
- number of seconds to write if there is a
CacheStore; zero disables write-behind
caching, which (combined with !fReadOnly)
implies write-throughdflRefreshAheadFactor
- the interval before an entry expiration
time (expressed as a percentage of the
internal cache expiration interval) during
which an asynchronous load request for the
entry will be scheduled; zero disables
refresh-ahead; only applicable when
the mapInternal parameter is an
instance of
LocalCache
public ReadWriteSplittingBackingMap(BackingMapManagerContext ctxService, PartitionAwareBackingMap mapInternal, Map mapMisses, BinaryEntryStore storeBinary, boolean fReadOnly, int cWriteBehindSeconds, double dflRefreshAheadFactor, boolean fWriteBehindRemove)
ctxService
- the context provided by the CacheService
which is using this backing mapmapInternal
- the PartitionAwareBackingMap used to store
the data internally in this backing map;
it must implement the ObservableMap
interfacemapMisses
- the Map used to cache CacheStore misses
(optional)storeBinary
- the BinaryEntryStore responsible for the
persistence of the cached data (optional)fReadOnly
- pass true is the specified loader is in
fact a CacheStore that needs to be used
only for read operations; changes to the
cache will not be persistedcWriteBehindSeconds
- number of seconds to write if there is a
CacheStore; zero disables write-behind
caching, which (combined with !fReadOnly)
implies write-throughdflRefreshAheadFactor
- the interval before an entry expiration
time (expressed as a percentage of the
internal cache expiration interval) during
which an asynchronous load request for the
entry will be scheduled; zero disables
refresh-ahead; only applicable when
the mapInternal parameter is an
instance of
LocalCache
fWriteBehindRemove
- pass true if the specified loader is in fact
a CacheStore that needs to apply write-behind to removepublic BackingMapManager getBackingMapManager()
getBackingMapManager
in interface PartitionAwareBackingMap
public String getName()
getName
in interface PartitionAwareBackingMap
public void createPartition(int nPid)
createPartition
in interface PartitionAwareBackingMap
nPid
- the partition id that the PartitionAwareBackingMap will be
responsible for, starting at this instantpublic void destroyPartition(int nPid)
destroyPartition
in interface PartitionAwareBackingMap
nPid
- the partition id that the PartitionAwareBackingMap will no
longer be responsible for, starting at this instantpublic Map getPartitionMap(int nPid)
getPartitionMap
in interface PartitionAwareBackingMap
nPid
- the partition IDpublic Map getPartitionMap(PartitionSet partitions)
getPartitionMap
in interface PartitionAwareBackingMap
partitions
- the masking PartitionSetpublic PartitionAwareBackingMap getPartitionAwareBackingMap()