public static class ExtensibleConfigurableCacheFactory.Manager extends AbstractBackingMapManager
This class also implements methods to create/release backup maps as needed by PartitionedCache$Storage$BackingManager.
Base.LoggingWriter, Base.StackFrame
Constructor and Description |
---|
Manager(ExtensibleConfigurableCacheFactory factory)
Construct the backing map manager.
|
Modifier and Type | Method and Description |
---|---|
protected CachingScheme |
findCachingScheme(String sName)
Return the
CachingScheme for a given cache name. |
protected DistributedScheme |
findDistributedScheme(String sName)
Return the
DistributedScheme for a given cache name. |
Map |
getBackingMap(String sName)
Get the backing Map associated with a given cache.
|
ExtensibleConfigurableCacheFactory |
getCacheFactory()
Obtain the "container" ConfigurableCacheFactory that created
this manager and which this manager is bound to.
|
protected com.tangosol.config.expression.ParameterResolver |
getResolver(String sName)
Return the
ParameterResolver for the given cache. |
protected com.tangosol.config.expression.ScopedParameterResolver |
getScopedResolver(String sName)
Return the
ScopedParameterResolver for the given cache. |
StorageAccessAuthorizer |
getStorageAccessAuthorizer(String sName)
Determine the
StorageAccessAuthorizer that is used by a
CacheService to secure access to the NamedCache with the specified name. |
void |
init(BackingMapManagerContext context)
Called by a CacheService to indicate to this manager that the manager
is being associated with the CacheService.
|
Map |
instantiateBackingMap(String sName)
Instantiate a [thread safe] Map that should be used by a CacheService
to store cached values for a NamedCache with the specified name.
|
Map |
instantiateBackupMap(String sName)
Instantiate a [thread safe] Map that should be used by a CacheService
to store cached values for a NamedCache with the specified name.
|
protected Map |
instantiatePartitionedBackingMap(MapBuilder bldrMap,
com.tangosol.config.expression.ParameterResolver resolver,
MapBuilder.Dependencies dependencies,
CachingScheme scheme)
Instantiate a partitioned backing map (an instance of
ObservableSplittingBackingMap )
using ExtensibleConfigurableCacheFactory.PartitionedBackingMapManager . |
boolean |
isBackingMapPersistent(String sName)
Determine if the contents of the Map that is used by a CacheService to
store cached values for a NamedCache with the specified name should be
persisted.
|
boolean |
isBackingMapSlidingExpiry(String sName)
Determine if the Map that is used by a CacheService to store cached values
for a NamedCache with specified name enables the sliding expiry - the
expiry delay being extended by the read operations.
|
boolean |
isBackupPartitioned(String sName)
Return true if the backup map should be partitioned.
|
void |
releaseBackingMap(String sName,
Map map)
Release the specified Map that was created using the
BackingMapManager.instantiateBackingMap(String) method. |
void |
releaseBackupMap(String sName,
Map map,
Map mapListeners)
Release the specified Map that was created using the
instantiateBackupMap(String) method. |
protected void |
setBackingMap(String sName,
Map map)
Associate the specified backing Map with a given name.
|
getContext
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, getThreadFactory, getTimeZone, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isBackingMapPersistent
public Manager(ExtensibleConfigurableCacheFactory factory)
factory
- the factory associated with this managerpublic void init(BackingMapManagerContext context)
Important note: BackingMapManager cannot be associated with more then one instance of a CacheService. However, in a situation when a CacheService automatically restarts, it is possible that this manager instance is re-used by a newly created (restarted) CacheService calling this method once again providing a new context.
Important note: BackingMapManager cannot be associated with more than one instance of a CacheService. However, in a situation when a CacheService automatically restarts, it is possible that this manager instance is re-used by a newly created (restarted) CacheService calling this method once again providing a new context.
init
in interface BackingMapManager
init
in class AbstractBackingMapManager
context
- the BackingMapManagerContext object for this BackingMapManagerpublic Map instantiateBackingMap(String sName)
If the contents of the Map can be modified by anything other than the CacheService itself (e.g. if the Map automatically expires its entries periodically or size-limits its contents), then the returned object must implement the ObservableMap interface.
sName
- the name of the NamedCache for which this backing map
is being createdprotected Map instantiatePartitionedBackingMap(MapBuilder bldrMap, com.tangosol.config.expression.ParameterResolver resolver, MapBuilder.Dependencies dependencies, CachingScheme scheme)
ObservableSplittingBackingMap
)
using ExtensibleConfigurableCacheFactory.PartitionedBackingMapManager
. If the provided scheme is an instance of
ReadWriteBackingMapScheme
, the internal scheme's map builder is used to build
the backing map.bldrMap
- the MapBuilder
for partitionsresolver
- the ParameterizedBuilder
dependencies
- the ExtensibleConfigurableCacheFactory.Dependencies
for MapBuilder
sscheme
- the CachingScheme
of the requested cachepublic boolean isBackingMapPersistent(String sName)
sName
- the name of the NamedCachepublic boolean isBackingMapSlidingExpiry(String sName)
sName
- the name of the NamedCachepublic StorageAccessAuthorizer getStorageAccessAuthorizer(String sName)
StorageAccessAuthorizer
that is used by a
CacheService to secure access to the NamedCache with the specified name.sName
- the name of the NamedCacheStorageAccessAuthorizer
or null if the authorizer is not configuredpublic void releaseBackingMap(String sName, Map map)
BackingMapManager.instantiateBackingMap(String)
method. This method is invoked
by the CacheService when the CacheService no longer requires the
specified Map object.releaseBackingMap
in interface BackingMapManager
releaseBackingMap
in class AbstractBackingMapManager
sName
- the name of the NamedCache for which the specified Map
object has acted as the backing mapmap
- the Map object that is being releasedpublic Map instantiateBackupMap(String sName)
sName
- the name of the NamedCache for which this map is
being createdpublic void releaseBackupMap(String sName, Map map, Map mapListeners)
instantiateBackupMap(String)
method. This method is invoked
by the CacheService when the CacheService no longer requires the
specified Map object.sName
- the cache namemap
- the Map object that is being releasedmapListeners
- the map of listeners for the mappublic boolean isBackupPartitioned(String sName)
sName
- the cache namepublic ExtensibleConfigurableCacheFactory getCacheFactory()
protected com.tangosol.config.expression.ParameterResolver getResolver(String sName)
ParameterResolver
for the given cache.sName
- the cache nameParameterResolver
protected com.tangosol.config.expression.ScopedParameterResolver getScopedResolver(String sName)
ScopedParameterResolver
for the given cache. A
scoped resolver is needed so that a sub-class (like TransactionScheme.Manager)
can add a parameter to the resolver.sName
- the cache nameScopedParameterResolver
public Map getBackingMap(String sName)
sName
- the cache nameprotected void setBackingMap(String sName, Map map)
sName
- the cache namemap
- the backing map associated with the specified nameprotected DistributedScheme findDistributedScheme(String sName)
DistributedScheme
for a given cache name.sName
- the cache nameDistributedScheme
or nullprotected CachingScheme findCachingScheme(String sName)
CachingScheme
for a given cache name. If the caching
scheme is a near cache then return the back scheme.sName
- the cache nameCachingScheme
or null