@Deprecated public class DefaultConfigurableCacheFactory extends Base implements ConfigurableCacheFactory
Developers are strongly encouraged to refactor the implementations that depend
on this class to use the extension mechanisms prescribed
by the the ExtensibleConfigurableCacheFactory
.
At some point in the future this class will be removed. No further development or enhancement of this class will occur going forward.
It is strongly recommended that developers get a ConfigurableCacheFactory instance via CacheFactory.getCacheFactoryBuilder().getConfigurableCacheFactory(), rather than instantiate a DefaultConfigurableCacheFactory instance directly.
DefaultConfigurableCacheFactory provides a facility to access caches declared in a "coherence-cache-config.xsd" compliant configuration file.
This class is designed to be easily extendable with a collection of factory methods allowing subclasses to customize it by overriding any subset of cache instantiation routines or even allowing addition of custom schemes.
There are various ways of using this factory:
ConfigurableCacheFactory factory = new DefaultConfigurableCacheFactory(sPath); ... ClassLoader loader = getClass().getClassLoader(); NamedCache cacheOne = factory.ensureCache("one", loader); NamedCache cacheTwo = factory.ensureCache("two", loader);Using this approach allows an easy customization by extending the DefaultConfigurableCacheFactory and changing the instantiation line:
ConfigurableCacheFactory factory = new CustomConfigurableCacheFactory(); ...Another option is using the static version of the "ensureCache" call:
ClassLoader loader = getClass().getClassLoader(); NamedCache cacheOne = CacheFactory.getCache("one", loader); NamedCache cacheTwo = CacheFactory.getCache("two", loader);which uses an instance of ConfigurableCacheFactory obtained by
CacheFactory.getConfigurableCacheFactory()
.CacheFactory.getCache(String, ClassLoader, NamedCache.Option...)
Modifier and Type | Class and Description |
---|---|
static class |
DefaultConfigurableCacheFactory.CacheInfo
Deprecated.
CacheInfo is a placeholder for cache attributes retrieved during parsing
the corresponding cache mapping element.
|
class |
DefaultConfigurableCacheFactory.Manager
Deprecated.
BackingMapManager implementation that uses the configuration XML to
create the required backing maps and provides client access to those maps.
|
protected class |
DefaultConfigurableCacheFactory.PartitionedBackingMapManager
Deprecated.
BackingMapManager implementation used by PartitionAwareBackingMap(s) to
lazily configure the enclosing PABM based on the configuration settings of
the enclosed maps.
|
Base.LoggingWriter, Base.StackFrame
Modifier and Type | Field and Description |
---|---|
static String |
CACHE_NAME
Deprecated.
The name of the replaceable parameter representing the cache name.
|
static String |
CACHE_REF
Deprecated.
The name of the replaceable parameter representing a cache reference.
|
static String |
CLASS_LOADER
Deprecated.
The name of the replaceable parameter representing the class loader.
|
static String |
FILE_CFG_CACHE
Deprecated.
The default configuration file name.
|
protected ResourceRegistry |
m_registry
Deprecated.
The
ResourceRegistry for configuration. |
protected Set |
m_setManager
Deprecated.
A Set of BackingMapManager instances registered by this factory.
|
protected com.tangosol.net.internal.ScopedCacheReferenceStore |
m_store
Deprecated.
Store that holds cache references scoped by class loader and optionally,
if configured, Subject.
|
static String |
MGR_CONTEXT
Deprecated.
The name of the replaceable parameter representing the backing map
manager context.
|
static int |
SCHEME_CLASS
Deprecated.
The custom class scheme.
|
static int |
SCHEME_DISK
Deprecated.
As of Coherence 3.0, replaced by
SCHEME_EXTERNAL
and SCHEME_EXTERNAL_PAGED |
static int |
SCHEME_DISTRIBUTED
Deprecated.
The distributed cache scheme.
|
static int |
SCHEME_EXTERNAL
Deprecated.
The external scheme.
|
static int |
SCHEME_EXTERNAL_PAGED
Deprecated.
The paged-external scheme.
|
static int |
SCHEME_FLASHJOURNAL
Deprecated.
The flash journal cache scheme.
|
static int |
SCHEME_INVOCATION
Deprecated.
The invocation service scheme.
|
static int |
SCHEME_LOCAL
Deprecated.
The local cache scheme.
|
static int |
SCHEME_NEAR
Deprecated.
The near cache scheme.
|
static int |
SCHEME_OPTIMISTIC
Deprecated.
The optimistic cache scheme.
|
static int |
SCHEME_OVERFLOW
Deprecated.
The overflow map scheme.
|
static int |
SCHEME_PAGED_TOPIC
Deprecated.
The paged topic scheme.
|
static int |
SCHEME_PROXY
Deprecated.
The proxy service scheme.
|
static int |
SCHEME_RAMJOURNAL
Deprecated.
The ram journal cache scheme.
|
static int |
SCHEME_READ_WRITE_BACKING
Deprecated.
The read write backing map scheme.
|
static String |
SCHEME_REF
Deprecated.
The name of the replaceable parameter representing a scheme reference.
|
static int |
SCHEME_REMOTE_CACHE
Deprecated.
The remote cache scheme.
|
static int |
SCHEME_REMOTE_INVOCATION
Deprecated.
The remote invocation scheme.
|
static int |
SCHEME_REPLICATED
Deprecated.
The replicated cache scheme.
|
static int |
SCHEME_TRANSACTIONAL
Deprecated.
The transactional cache scheme.
|
static int |
SCHEME_UNKNOWN
Deprecated.
The unknown scheme type.
|
static int |
SCHEME_VERSIONED_BACKING
Deprecated.
The versioned backing map scheme.
|
static int |
SCHEME_VERSIONED_NEAR
Deprecated.
The versioned near cache scheme.
|
Constructor and Description |
---|
DefaultConfigurableCacheFactory()
Deprecated.
Construct a default DefaultConfigurableCacheFactory using the
default configuration file name.
|
DefaultConfigurableCacheFactory(String sPath)
Deprecated.
Construct a DefaultConfigurableCacheFactory using the specified path to
a "coherence-cache-config.xsd" compliant configuration file or resource.
|
DefaultConfigurableCacheFactory(String sPath,
ClassLoader loader)
Deprecated.
Construct a DefaultConfigurableCacheFactory using the specified path to
a "coherence-cache-config.xsd" compliant configuration file or resource.
|
DefaultConfigurableCacheFactory(XmlElement xmlConfig)
Deprecated.
Construct a DefaultConfigurableCacheFactory using the specified
configuration XML.
|
DefaultConfigurableCacheFactory(XmlElement xmlConfig,
ClassLoader loader)
Deprecated.
Construct a DefaultConfigurableCacheFactory using the specified
configuration XML.
|
Modifier and Type | Method and Description |
---|---|
void |
activate()
Deprecated.
Activate prepares the factory to be used within a container and should be
called before any other factory method.
|
protected static void |
checkPermission(NamedCache cache)
Deprecated.
Check if the current user is allowed to "join" the cache.
|
static Map |
collectServiceSchemes(XmlElement xmlConfig)
Deprecated.
Collect a map keyed by service names with values of corresponding service
schemes in the specified cache configuration.
|
protected static void |
collectServiceSchemes(XmlElement xmlScheme,
XmlElement xmlConfig,
HashMap mapService)
Deprecated.
Collect the service-schemes referenced by the specified scheme element in
the cache configuration and update the specified mapping of service names
to the associated service schemes.
|
Map |
configureBackingMap(DefaultConfigurableCacheFactory.CacheInfo info,
XmlElement xmlScheme,
BackingMapManagerContext context,
ClassLoader loader,
Map mapListeners)
Deprecated.
Configures a backing map according to the scheme.
|
NamedCache |
configureCache(DefaultConfigurableCacheFactory.CacheInfo info,
XmlElement xmlScheme,
ClassLoader loader)
Deprecated.
Ensures a cache for given scheme.
|
protected void |
configureInterceptors(XmlElement xmlConfig)
Deprecated.
Using the provided base XML find all interceptors instantiating as
appropriate and registering with the Events
Registry . |
protected void |
configureUnitCalculator(XmlElement xmlCache,
ConfigurableCacheMap cache,
DefaultConfigurableCacheFactory.CacheInfo info,
BackingMapManagerContext context,
ClassLoader loader)
Deprecated.
Configure a UnitCalculator for the specified ConfigurableCacheMap.
|
protected double |
convertDouble(XmlValue xmlValue)
Deprecated.
Convert the value in the specified
XmlValue to a double. |
protected int |
convertInt(XmlValue xmlValue)
Deprecated.
Convert the value in the specified
XmlValue to an int. |
protected int |
convertInt(XmlValue xmlValue,
int nDefault)
Deprecated.
Convert the value in the specified
XmlValue to an int. |
protected long |
convertLong(XmlValue xmlValue)
Deprecated.
Convert the value in the specified
XmlValue to a long. |
void |
destroyCache(NamedCache cache)
Deprecated.
Release and destroy this instance of NamedCache.
|
void |
destroyTopic(NamedTopic<?> topic)
Deprecated.
This method will throw an
UnsupportedOperationException as
NamedTopic s are not supported by DefaultConfigurableCacheFactory. |
void |
dispose()
Deprecated.
Dispose of this factory.
|
protected NamedCache |
ensureCache(DefaultConfigurableCacheFactory.CacheInfo info,
XmlElement xmlScheme,
ClassLoader loader)
Deprecated.
Obtain the NamedCache reference for the cache service defined by the
specified scheme.
|
<K,V> NamedCache<K,V> |
ensureCache(String sCacheName,
ClassLoader loader,
NamedCache.Option... options)
Deprecated.
Ensure an cache for the given name, classloader and options.
|
Service |
ensureService(String sServiceName)
Deprecated.
Ensure a service for the given name.
|
Service |
ensureService(XmlElement xmlScheme)
Deprecated.
Ensure the service for the specified scheme.
|
protected Service |
ensureServiceInternal(XmlElement xmlScheme)
Deprecated.
Ensure the service for the specified scheme.
|
<V> NamedTopic<V> |
ensureTopic(String sName,
ClassLoader loader,
NamedCollection.Option... options)
Deprecated.
This method will throw an
UnsupportedOperationException as
NamedTopic s are not supported by DefaultConfigurableCacheFactory. |
protected XmlElement |
findScheme(String sSchemeName)
Deprecated.
In the configuration XML find a "scheme" element associated with a given
scheme name.
|
protected static XmlElement |
findScheme(XmlElement xmlConfig,
String sSchemeName)
Deprecated.
In the specified configuration XML, find a "scheme" element associated with
the specified scheme name.
|
DefaultConfigurableCacheFactory.CacheInfo |
findSchemeMapping(String sCacheName)
Deprecated.
In the configuration XML find a "cache-mapping" element associated with a
given cache name.
|
protected XmlElement |
findServiceScheme(String sServiceName)
Deprecated.
In the configuration XML find a "scheme" element associated with a
given service name.
|
XmlElement |
getConfig()
Deprecated.
Obtain the factory configuration XML.
|
protected ClassLoader |
getConfigClassLoader()
Deprecated.
Return the class loader used to load the configuration for this factory.
|
protected XmlElement |
getConfigUnsafe()
Deprecated.
Obtain a mutable reference to the factory configuration XML.
|
InterceptorRegistry |
getInterceptorRegistry()
Deprecated.
Return the
InterceptorRegistry used to register event interceptors
for this factory. |
protected static long |
getRequestTimeout(XmlElement xmlScheme)
Deprecated.
Return the request timeout based on the
XmlElement . |
ResourceRegistry |
getResourceRegistry()
Deprecated.
Return the
ResourceRegistry for this factory. |
String |
getScopedServiceName(String sServiceName)
Deprecated.
Apply the scope name prefix to the given service name.
|
String |
getScopeName()
Deprecated.
Return the scope name for this ConfigurableCacheFactory.
|
protected void |
initializeBundler(AbstractBundler bundler,
XmlElement xmlBundle)
Deprecated.
Initialize the specified bundler using the "bundle-config" element.
|
Object |
instantiateAny(DefaultConfigurableCacheFactory.CacheInfo info,
XmlElement xmlClass,
BackingMapManagerContext context,
ClassLoader loader)
Deprecated.
Create an Object using "class-scheme" element.
|
protected AsyncBinaryStore |
instantiateAsyncBinaryStore(BinaryStore store,
int cbMaxAsync)
Deprecated.
Construct an AsyncBinaryStore using the specified parameters.
|
protected AsyncBinaryStoreManager |
instantiateAsyncBinaryStoreManager(BinaryStoreManager storeMgr,
int cbMaxAsync)
Deprecated.
Construct an AsyncBinaryStoreManager using the specified parameters.
|
protected BackingMapManager |
instantiateBackingMapManager(int nSchemeType,
XmlElement xmlScheme)
Deprecated.
Instantiate a BackingMapManager for a given scheme type.
|
protected BinaryStoreManager |
instantiateBinaryStoreManager(XmlElement xmlConfig,
ClassLoader loader,
boolean fPaged)
Deprecated.
Create a BinaryStoreManager using the specified XML configuration.
|
protected BundlingNamedCache |
instantiateBundlingNamedCache(NamedCache cache,
XmlElement xmlBundling)
Deprecated.
Create a BundlingNamedCache using the "operation-bundling" element.
|
protected Object |
instantiateCacheStore(DefaultConfigurableCacheFactory.CacheInfo info,
XmlElement xmlStore,
BackingMapManagerContext context,
ClassLoader loader)
Deprecated.
Create a CacheLoader, CacheStore or BinaryEntryStore using the
"cachestore-scheme" element.
|
protected Map |
instantiateDiskBackingMap(DefaultConfigurableCacheFactory.CacheInfo info,
XmlElement xmlDisk,
BackingMapManagerContext context,
ClassLoader loader)
Deprecated.
As of Coherence 3.0, replaced by
instantiateExternalBackingMap(com.tangosol.net.DefaultConfigurableCacheFactory.CacheInfo, com.tangosol.run.xml.XmlElement, com.tangosol.net.BackingMapManagerContext, java.lang.ClassLoader) and
instantiatePagedExternalBackingMap(com.tangosol.net.DefaultConfigurableCacheFactory.CacheInfo, com.tangosol.run.xml.XmlElement, com.tangosol.net.BackingMapManagerContext, java.lang.ClassLoader) |
protected Map |
instantiateExternalBackingMap(DefaultConfigurableCacheFactory.CacheInfo info,
XmlElement xmlExternal,
BackingMapManagerContext context,
ClassLoader loader)
Deprecated.
Create a backing Map using the "external-scheme" element.
|
protected Map |
instantiateFlashJournalBackingMap(DefaultConfigurableCacheFactory.CacheInfo info,
XmlElement xmlJournal,
BackingMapManagerContext context,
ClassLoader loader)
Deprecated.
Create a backing Map using the "flashjournal-scheme" element.
|
protected Map |
instantiateLocalCache(DefaultConfigurableCacheFactory.CacheInfo info,
XmlElement xmlLocal,
BackingMapManagerContext context,
ClassLoader loader)
Deprecated.
Create a backing Map using the "local-scheme" element.
|
protected LocalCache |
instantiateLocalCache(int cUnits,
int cExpiryMillis)
Deprecated.
Construct a LocalCache using the specified parameters.
|
protected Map |
instantiateMap(DefaultConfigurableCacheFactory.CacheInfo info,
XmlElement xmlClass,
BackingMapManagerContext context,
ClassLoader loader)
Deprecated.
Create a backing Map using the "class-scheme" element.
|
protected MapListener |
instantiateMapListener(DefaultConfigurableCacheFactory.CacheInfo info,
XmlElement xmlClass,
BackingMapManagerContext context,
ClassLoader loader)
Deprecated.
Create a MapListener using the using the "class-scheme" element.
|
protected NearCache |
instantiateNearCache(Map mapFront,
NamedCache mapBack,
int nStrategy)
Deprecated.
Construct an NearCache using the specified parameters.
|
protected Map |
instantiateOverflowBackingMap(DefaultConfigurableCacheFactory.CacheInfo info,
XmlElement xmlOverflow,
BackingMapManagerContext context,
ClassLoader loader,
Map mapListeners)
Deprecated.
Create a backing Map using the "overflow-scheme" element.
|
protected OverflowMap |
instantiateOverflowMap(ObservableMap mapFront,
Map mapBack,
boolean fExpiry)
Deprecated.
Construct an OverflowMap using the specified parameters.
|
protected Map |
instantiatePagedExternalBackingMap(DefaultConfigurableCacheFactory.CacheInfo info,
XmlElement xmlPaged,
BackingMapManagerContext context,
ClassLoader loader)
Deprecated.
Create a backing Map using the "paged-external-scheme" element.
|
protected Map |
instantiateRamJournalBackingMap(DefaultConfigurableCacheFactory.CacheInfo info,
XmlElement xmlJournal,
BackingMapManagerContext context,
ClassLoader loader)
Deprecated.
Create a backing Map using the "ramjournal-scheme" element.
|
protected ReadWriteBackingMap |
instantiateReadWriteBackingMap(BackingMapManagerContext context,
ObservableMap mapInternal,
Map mapMisses,
BinaryEntryStore storeBinary,
boolean fReadOnly,
int cWriteBehindSeconds,
double dflRefreshAheadFactor)
Deprecated.
Construct a ReadWriteBackingMap using the specified parameters.
|
protected ReadWriteBackingMap |
instantiateReadWriteBackingMap(BackingMapManagerContext context,
ObservableMap mapInternal,
Map mapMisses,
CacheLoader store,
boolean fReadOnly,
int cWriteBehindSeconds,
double dflRefreshAheadFactor)
Deprecated.
Construct a ReadWriteBackingMap using the specified parameters.
|
protected Map |
instantiateReadWriteBackingMap(DefaultConfigurableCacheFactory.CacheInfo info,
XmlElement xmlRWBM,
BackingMapManagerContext context,
Map mapListeners)
Deprecated.
Create a ReadWriteBackingMap using the "read-write-backing-map-scheme" element.
|
protected ReadWriteSplittingBackingMap |
instantiateReadWriteSplittingBackingMap(BackingMapManagerContext context,
PartitionAwareBackingMap mapInternal,
Map mapMisses,
BinaryEntryStore storeBinary,
boolean fReadOnly,
int cWriteBehindSeconds,
double dflRefreshAheadFactor)
Deprecated.
Construct a ReadWriteSplittingBackingMap using the specified parameters.
|
protected ReadWriteSplittingBackingMap |
instantiateReadWriteSplittingBackingMap(BackingMapManagerContext context,
PartitionAwareBackingMap mapInternal,
Map mapMisses,
CacheLoader store,
boolean fReadOnly,
int cWriteBehindSeconds,
double dflRefreshAheadFactor)
Deprecated.
Construct a ReadWriteSplittingBackingMap using the specified parameters.
|
protected SerializationCache |
instantiateSerializationCache(BinaryStore store,
int cMax,
boolean fBinaryMap)
Deprecated.
Construct an SerializationCache using the specified parameters.
|
protected SerializationCache |
instantiateSerializationCache(BinaryStore store,
int cMax,
ClassLoader loader)
Deprecated.
Construct an SerializationCache using the specified parameters.
|
protected SerializationMap |
instantiateSerializationMap(BinaryStore store,
boolean fBinaryMap)
Deprecated.
Construct an SerializationMap using the specified parameters.
|
protected Map |
instantiateSerializationMap(BinaryStore store,
boolean fBinaryMap,
ClassLoader loader,
int cHighUnits,
int cExpiryMillis,
String sSubclass,
XmlElement xmlInitParams)
Deprecated.
Instantiate a SerializationMap, SerializationCache,
SimpleSerializationMap, or any sub-class thereof.
|
protected SerializationMap |
instantiateSerializationMap(BinaryStore store,
ClassLoader loader)
Deprecated.
Construct an SerializationMap using the specified parameters.
|
protected SerializationPagedCache |
instantiateSerializationPagedCache(BinaryStoreManager storeMgr,
int cPages,
int cPageSecs,
boolean fBinaryMap,
boolean fPassive)
Deprecated.
Construct an SerializationPagedCache using the specified parameters.
|
protected SerializationPagedCache |
instantiateSerializationPagedCache(BinaryStoreManager storeMgr,
int cPages,
int cPageSecs,
ClassLoader loader)
Deprecated.
Construct an SerializationPagedCache using the specified parameters.
|
protected SimpleOverflowMap |
instantiateSimpleOverflowMap(ObservableMap mapFront,
Map mapBack,
Map mapMisses)
Deprecated.
Construct a SimpleOverflowMap using the specified parameters.
|
protected SimpleSerializationMap |
instantiateSimpleSerializationMap(BinaryStore store,
boolean fBinaryMap)
Deprecated.
Construct a SimpleSerializationMap using the specified parameters.
|
protected SimpleSerializationMap |
instantiateSimpleSerializationMap(BinaryStore store,
ClassLoader loader)
Deprecated.
Construct a SimpleSerializationMap using the specified parameters.
|
Object |
instantiateSubclass(String sClass,
Class clzSuper,
ClassLoader loader,
Object[] aoParam,
XmlElement xmlParams)
Deprecated.
Construct an instance of the specified class using the specified
parameters.
|
protected VersionedBackingMap |
instantiateVersionedBackingMap(BackingMapManagerContext context,
ObservableMap mapInternal,
Map mapMisses,
CacheLoader loader,
NamedCache mapVersionTransient,
NamedCache mapVersionPersist,
boolean fManageTransient)
Deprecated.
Construct a VersionedBackingMap using the specified parameters.
|
protected VersionedBackingMap |
instantiateVersionedBackingMap(BackingMapManagerContext context,
ObservableMap mapInternal,
Map mapMisses,
CacheStore store,
boolean fReadOnly,
int cWriteBehindSeconds,
double dflRefreshAheadFactor,
NamedCache mapVersionTransient,
NamedCache mapVersionPersist,
boolean fManageTransient)
Deprecated.
Construct a VersionedBackingMap using the specified parameters.
|
protected Map |
instantiateVersionedBackingMap(DefaultConfigurableCacheFactory.CacheInfo info,
XmlElement xmlVBM,
BackingMapManagerContext context,
Map mapListeners)
Deprecated.
Create a VersionedBackingMap using the "versioned-backing-map-scheme" element.
|
protected VersionedNearCache |
instantiateVersionedNearCache(Map mapLocal,
NamedCache mapDist,
NamedCache mapVersion)
Deprecated.
Construct an VersionedNearCache using the specified parameters.
|
boolean |
isCacheActive(String sCacheName,
ClassLoader loader)
Deprecated.
Validate whether a cache with the given name is active in the context
of the given
ClassLoader . |
static boolean |
isCanonicalKeySupported(Map map)
Deprecated.
Determine whether the provided map allows reference access to the keys it holds.
|
static boolean |
isPutAllOptimized(Map map)
Deprecated.
|
protected boolean |
isSerializerCompatible(Service serviceThis,
Service serviceThat)
Deprecated.
Determines whether or not the serializers for the specified services are
compatible.
|
static XmlDocument |
loadConfig(String sName)
Deprecated.
Load the configuration from a file or resource.
|
static XmlDocument |
loadConfig(String sName,
ClassLoader loader)
Deprecated.
Load the configuration from a file or resource.
|
static XmlDocument |
loadConfigAsResource(String sResource,
ClassLoader loader)
Deprecated.
Load the configuration as a resource.
|
static XmlDocument |
loadConfigFromFile(File file)
Deprecated.
Load the configuration from a file or directory.
|
protected String |
popCacheContext()
Deprecated.
Pop cache context from a thread-local storage.
|
protected void |
pushCacheContext(String sContext)
Deprecated.
Push cache context into a thread-local storage.
|
protected void |
register(CacheService service,
String sCacheName,
String sContext,
Map map)
Deprecated.
as of Coherence 3.7.1; use
MBeanHelper.registerCacheMBean(CacheService, String, String, Map) instead |
protected void |
register(NamedCache cache,
String sContext)
Deprecated.
as of Coherence 3.7.1; use
MBeanHelper.registerCacheMBean(NamedCache, String) instead |
protected void |
registerBackingMapManager(BackingMapManager mgr)
Deprecated.
Register the specified BackingMapManager as a "valid" one.
|
protected void |
registerInterceptor(XmlElement xmlInterceptor,
String sCacheName,
String sServiceName)
Deprecated.
This method will instantiate an
EventInterceptor based on the
XML provided. |
protected void |
release(BinaryStore store)
Deprecated.
Release all resources associated with the specified binary store.
|
protected void |
release(CacheLoader loader)
Deprecated.
Release all resources associated with the specified loader.
|
void |
release(Map map,
Map mapListeners)
Deprecated.
Release all resources associated with the specified backing map.
|
void |
releaseCache(NamedCache cache)
Deprecated.
Release a cache and its associated resources.
|
protected void |
releaseCache(NamedCache cache,
boolean fDestroy)
Deprecated.
Release a cache managed by this factory, optionally destroying it.
|
void |
releaseTopic(NamedTopic<?> topic)
Deprecated.
This method will throw an
UnsupportedOperationException as
NamedTopic s are not supported by DefaultConfigurableCacheFactory. |
protected void |
reportConversionError(XmlValue xmlValue,
String sType,
String sDefault,
RuntimeException e)
Deprecated.
Log a failed type conversion.
|
XmlElement |
resolveBackingMapScheme(DefaultConfigurableCacheFactory.CacheInfo info,
XmlElement xmlScheme)
Deprecated.
Traverse the specified scheme to find an enclosed "backing-map-scheme" or
a scheme that could serve as such.
|
XmlElement |
resolveScheme(DefaultConfigurableCacheFactory.CacheInfo info)
Deprecated.
In the configuration XML find a "scheme" element associated with a
given cache and resolve it (recursively) using the "scheme-ref"
elements.
|
protected XmlElement |
resolveScheme(XmlElement xmlScheme,
DefaultConfigurableCacheFactory.CacheInfo info,
boolean fChild,
boolean fRequired)
Deprecated.
Resolve the specified "XYZ-scheme" by retrieving the base element
referred to by the "scheme-ref" element, resolving it recursively,
and combining it with the specified overrides and cache specific attributes.
|
protected static XmlElement |
resolveScheme(XmlElement xmlConfig,
XmlElement xmlScheme,
DefaultConfigurableCacheFactory.CacheInfo info,
boolean fChild,
boolean fRequired,
boolean fApply)
Deprecated.
Resolve the specified "XYZ-scheme" by retrieving the base element
referred to by the "scheme-ref" element, resolving it recursively,
and combining it with the specified overrides and cache specific attributes.
|
protected void |
resolveSerializer(XmlElement xmlConfig)
Deprecated.
Resolve and inject service serializer elements based on defaults
defined in the cache configuration.
|
protected void |
resolveSocketProvider(XmlElement xmlConfig)
Deprecated.
Resolve and inject service socket-provider elements based on defaults
defined in the cache configuration.
|
void |
setConfig(XmlElement xmlConfig)
Deprecated.
Specify the factory configuration XML.
|
void |
setConfigClassLoader(ClassLoader loader)
Deprecated.
Set the class loader used to load the configuration for this factory.
|
void |
setScopeName(String sScopeName)
Deprecated.
Set the scope name for this ConfigurableCacheFactory.
|
protected void |
startService(Service service)
Deprecated.
Start the given
Service . |
int |
translateSchemeType(String sScheme)
Deprecated.
Translate the scheme name into the scheme type.
|
static int |
translateStandardSchemeType(String sScheme)
Deprecated.
Translate the scheme name into the scheme type.
|
protected void |
unregister(CacheService service,
String sCacheName)
Deprecated.
as of Coherence 3.7.1; use
MBeanHelper.unregisterCacheMBean(CacheService, String, String) instead |
protected void |
unregister(String sCacheName,
String sContext)
Deprecated.
as of Coherence 3.7.1; use
MBeanHelper.unregisterCacheMBean(String, String) instead |
protected void |
validateBackingMapManager(CacheService service)
Deprecated.
Ensures that the backing map manager of the specified service was
configured by this (or equivalent) factory.
|
protected void |
verifyMapListener(DefaultConfigurableCacheFactory.CacheInfo info,
Map map,
XmlElement xmlScheme,
BackingMapManagerContext context,
ClassLoader loader,
Map mapListeners)
Deprecated.
Check whether or not a MapListener has to be instantiated and
added to a Map according to a scheme definition.
|
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
ensureCache, ensureTopic, ensureTypedCache
public static final String FILE_CFG_CACHE
public static final String CACHE_NAME
public static final String CLASS_LOADER
public static final String MGR_CONTEXT
public static final String SCHEME_REF
public static final String CACHE_REF
public static final int SCHEME_UNKNOWN
public static final int SCHEME_REPLICATED
public static final int SCHEME_OPTIMISTIC
public static final int SCHEME_DISTRIBUTED
public static final int SCHEME_NEAR
public static final int SCHEME_VERSIONED_NEAR
public static final int SCHEME_LOCAL
public static final int SCHEME_OVERFLOW
public static final int SCHEME_DISK
SCHEME_EXTERNAL
and SCHEME_EXTERNAL_PAGED
public static final int SCHEME_EXTERNAL
public static final int SCHEME_EXTERNAL_PAGED
public static final int SCHEME_CLASS
public static final int SCHEME_READ_WRITE_BACKING
public static final int SCHEME_VERSIONED_BACKING
public static final int SCHEME_INVOCATION
public static final int SCHEME_PROXY
public static final int SCHEME_REMOTE_CACHE
public static final int SCHEME_REMOTE_INVOCATION
public static final int SCHEME_TRANSACTIONAL
public static final int SCHEME_FLASHJOURNAL
public static final int SCHEME_RAMJOURNAL
public static final int SCHEME_PAGED_TOPIC
protected com.tangosol.net.internal.ScopedCacheReferenceStore m_store
protected Set m_setManager
Note: we rely on the BackingMapManager classes *not* to override the hashCode() and equals() methods.
protected ResourceRegistry m_registry
ResourceRegistry
for configuration.public DefaultConfigurableCacheFactory()
public DefaultConfigurableCacheFactory(String sPath)
sPath
- the configuration resource name or file pathpublic DefaultConfigurableCacheFactory(String sPath, ClassLoader loader)
sPath
- the configuration resource name or file pathloader
- (optional) ClassLoader that should be used to load the
configuration resourcepublic DefaultConfigurableCacheFactory(XmlElement xmlConfig)
xmlConfig
- the configuration XmlElementpublic DefaultConfigurableCacheFactory(XmlElement xmlConfig, ClassLoader loader)
xmlConfig
- the configuration XmlElementloader
- (optional) ClassLoader that should be used to load the
configuration resourcepublic XmlElement getConfig()
protected XmlElement getConfigUnsafe()
Note: The caller may not modify the resulting XmlElement's in any way.
public void setConfig(XmlElement xmlConfig)
xmlConfig
- the configuration XMLpublic <K,V> NamedCache<K,V> ensureCache(String sCacheName, ClassLoader loader, NamedCache.Option... options)
ensureCache
in interface ConfigurableCacheFactory
sCacheName
- the cache nameloader
- ClassLoader that should be used to deserialize
objects in the cacheoptions
- the NamedCache.Option
spublic void releaseCache(NamedCache cache)
Releasing a cache makes it no longer usable, but does not affect the cache itself. In other words, all other references to the cache will still be valid, and the cache data is not affected by releasing the reference. Any attempt to use the released cache reference afterword will result in an exception.
releaseCache
in interface ConfigurableCacheFactory
cache
- the cache to releasepublic void destroyCache(NamedCache cache)
Warning: This method is used to completely destroy the specified cache across the cluster. All references in the entire cluster to this cache will be invalidated, the cached data will be cleared, and all internal and associated resources will be released.
destroyCache
in interface ConfigurableCacheFactory
cache
- the cache to releasepublic <V> NamedTopic<V> ensureTopic(String sName, ClassLoader loader, NamedCollection.Option... options)
UnsupportedOperationException
as
NamedTopic
s are not supported by DefaultConfigurableCacheFactory.ensureTopic
in interface ConfigurableCacheFactory
sName
- the topic nameloader
- ClassLoader that should be used to deserialize
objects in the cacheoptions
- the NamedTopic.Option
s to control any optional
topic configurationpublic void releaseTopic(NamedTopic<?> topic)
UnsupportedOperationException
as
NamedTopic
s are not supported by DefaultConfigurableCacheFactory.releaseTopic
in interface ConfigurableCacheFactory
topic
- the topic to releasepublic void destroyTopic(NamedTopic<?> topic)
UnsupportedOperationException
as
NamedTopic
s are not supported by DefaultConfigurableCacheFactory.destroyTopic
in interface ConfigurableCacheFactory
topic
- the topic to releasepublic Service ensureService(String sServiceName)
ensureService
in interface ConfigurableCacheFactory
sServiceName
- the service namepublic void activate()
activate
in interface ConfigurableCacheFactory
public void dispose()
ConfigurableCacheFactory.getResourceRegistry()
.
This factory may not be used after invoking dispose.dispose
in interface ConfigurableCacheFactory
public boolean isCacheActive(String sCacheName, ClassLoader loader)
ClassLoader
. The ClassLoader should be the same
as provided to a previous call to ConfigurableCacheFactory.ensureCache(String, ClassLoader, NamedCache.Option...)
.isCacheActive
in interface ConfigurableCacheFactory
sCacheName
- the cache nameloader
- the ClassLoader that should be used to deserialize
objects in the cachepublic String getScopeName()
public void setScopeName(String sScopeName)
CacheFactoryBuilder
when initializing this ConfigurableCacheFactory instance.
This method will be removed in a future release.
sScopeName
- the scope name for this ConfigurableCacheFactoryIllegalStateException
- if this setter is invoked after a
service startprotected ClassLoader getConfigClassLoader()
public ResourceRegistry getResourceRegistry()
ResourceRegistry
for this factory.getResourceRegistry
in interface ConfigurableCacheFactory
public InterceptorRegistry getInterceptorRegistry()
InterceptorRegistry
used to register event interceptors
for this factory.getInterceptorRegistry
in interface ConfigurableCacheFactory
protected static void checkPermission(NamedCache cache)
cache
- the cacheSecurityException
- if permission is deniedpublic void setConfigClassLoader(ClassLoader loader)
loader
- the class loader to use for loading the configpublic static XmlDocument loadConfig(String sName)
sName
- the name of file or resource.public static XmlDocument loadConfig(String sName, ClassLoader loader)
sName
- the name of file or resource.loader
- (optional) ClassLoader that should be used to load the
configuration resourcepublic static XmlDocument loadConfigAsResource(String sResource, ClassLoader loader)
sResource
- the resource nameloader
- (optional) ClassLoader that should be used to load the
configuration resourcepublic static XmlDocument loadConfigFromFile(File file)
file
- file or directory to load the configuration frompublic DefaultConfigurableCacheFactory.CacheInfo findSchemeMapping(String sCacheName)
sCacheName
- the value of the "cache-name" element to look forpublic XmlElement resolveScheme(DefaultConfigurableCacheFactory.CacheInfo info)
info
- the cache infoprotected XmlElement findScheme(String sSchemeName)
sSchemeName
- the value of the "scheme-name" element to look forprotected static XmlElement findScheme(XmlElement xmlConfig, String sSchemeName)
xmlConfig
- the xml configurationsSchemeName
- the value of the "scheme-name" element to look forpublic static Map collectServiceSchemes(XmlElement xmlConfig)
xmlConfig
- the cache configurationprotected static void collectServiceSchemes(XmlElement xmlScheme, XmlElement xmlConfig, HashMap mapService)
xmlScheme
- a scheme elementxmlConfig
- the cache configurationmapService
- a map of service name to service schemeprotected XmlElement findServiceScheme(String sServiceName)
sServiceName
- the value of the "service-name" element to look forprotected static XmlElement resolveScheme(XmlElement xmlConfig, XmlElement xmlScheme, DefaultConfigurableCacheFactory.CacheInfo info, boolean fChild, boolean fRequired, boolean fApply)
xmlConfig
- the cache configuration xmlxmlScheme
- a scheme element to resolveinfo
- the cache info (optional)fChild
- if true, the actual cache scheme is the only "xyz-scheme"
child of the specified xmlScheme element;
otherwise it's the xmlScheme element itselffRequired
- if true, the child scheme must be present; false otherwisefApply
- if true, apply the specified overrides and cache-specific
attributes to the base scheme element; otherwise return
a reference to the base scheme elementprotected XmlElement resolveScheme(XmlElement xmlScheme, DefaultConfigurableCacheFactory.CacheInfo info, boolean fChild, boolean fRequired)
xmlScheme
- a scheme element to resolveinfo
- the cache info (optional)fChild
- if true, the actual cache scheme is the only "xyz-scheme"
child of the specified xmlScheme element;
otherwise it's the xmlScheme element itselffRequired
- if true, the child scheme must be present; false otherwiseprotected NamedCache ensureCache(DefaultConfigurableCacheFactory.CacheInfo info, XmlElement xmlScheme, ClassLoader loader)
info
- the cache infoxmlScheme
- the scheme element for the cacheloader
- (optional) ClassLoader that should be used to
deserialize objects in the cachepublic Service ensureService(XmlElement xmlScheme)
xmlScheme
- the schemeprotected Service ensureServiceInternal(XmlElement xmlScheme)
xmlScheme
- the schemeprotected void startService(Service service)
Service
. Extensions of this class can
override this method to provide pre/post start functionality.service
- the Service
to startpublic String getScopedServiceName(String sServiceName)
sServiceName
- the service nameprotected void resolveSerializer(XmlElement xmlConfig)
xmlConfig
- the configuration element to examine and modifyprotected void resolveSocketProvider(XmlElement xmlConfig)
xmlConfig
- the configuration element to examine and modifyprotected BackingMapManager instantiateBackingMapManager(int nSchemeType, XmlElement xmlScheme)
Note: we rely on the BackingMapManager implementations to have their equals() method test for object identity using the "==" operator (in other words not to override the hashCode() and equals() methods).
nSchemeType
- the scheme type (one of the SCHEME-* constants)xmlScheme
- the scheme used to configure the corresponding serviceprotected void registerBackingMapManager(BackingMapManager mgr)
mgr
- a BackingMapManager instance instantiated by this factoryprotected void validateBackingMapManager(CacheService service)
service
- the CacheService to validatepublic NamedCache configureCache(DefaultConfigurableCacheFactory.CacheInfo info, XmlElement xmlScheme, ClassLoader loader)
info
- the cache infoxmlScheme
- the corresponding schemeloader
- ClassLoader that should be used to deserialize
objects in the cacheprotected NearCache instantiateNearCache(Map mapFront, NamedCache mapBack, int nStrategy)
This method exposes a corresponding NearCache
constructor
and is provided for the express purpose of allowing its override.
protected VersionedNearCache instantiateVersionedNearCache(Map mapLocal, NamedCache mapDist, NamedCache mapVersion)
This method exposes a corresponding VersionedNearCache
constructor
and is provided for the express purpose of allowing its override.
public Map configureBackingMap(DefaultConfigurableCacheFactory.CacheInfo info, XmlElement xmlScheme, BackingMapManagerContext context, ClassLoader loader, Map mapListeners)
info
- the cache infoxmlScheme
- the scheme element for cache configurationcontext
- BackingMapManagerContext to be usedloader
- the ClassLoader to instantiate necessary classesmapListeners
- map of registered map listeners keyed by the
corresponding map referencespublic XmlElement resolveBackingMapScheme(DefaultConfigurableCacheFactory.CacheInfo info, XmlElement xmlScheme)
info
- the cache infoxmlScheme
- the scheme element for cache configurationprotected void verifyMapListener(DefaultConfigurableCacheFactory.CacheInfo info, Map map, XmlElement xmlScheme, BackingMapManagerContext context, ClassLoader loader, Map mapListeners)
info
- the cache infomap
- an ObservableMap to add a listener toxmlScheme
- the corresponding schemecontext
- BackingMapManagerContext to be usedloader
- ClassLoader that should be used to instantiate
a MapListener objectmapListeners
- map of registered map listeners keyed by the
corresponding map referencesIllegalArgumentException
- if the listener is required, but the
map does not implement ObservableMap interface or if the
listener cannot be instantiatedprotected Map instantiateReadWriteBackingMap(DefaultConfigurableCacheFactory.CacheInfo info, XmlElement xmlRWBM, BackingMapManagerContext context, Map mapListeners)
info
- the cache infoxmlRWBM
- "read-write-backing-map-scheme" elementcontext
- BackingMapManagerContext to be usedmapListeners
- map of registered map listeners keyed by the
corresponding map referencesprotected ReadWriteBackingMap instantiateReadWriteBackingMap(BackingMapManagerContext context, ObservableMap mapInternal, Map mapMisses, CacheLoader store, boolean fReadOnly, int cWriteBehindSeconds, double dflRefreshAheadFactor)
This method exposes a corresponding ReadWriteBackingMap
constructor
and is provided for the express purpose of allowing its override.
protected ReadWriteBackingMap instantiateReadWriteBackingMap(BackingMapManagerContext context, ObservableMap mapInternal, Map mapMisses, BinaryEntryStore storeBinary, boolean fReadOnly, int cWriteBehindSeconds, double dflRefreshAheadFactor)
This method exposes a corresponding ReadWriteBackingMap
constructor
and is provided for the express purpose of allowing its override.
protected ReadWriteSplittingBackingMap instantiateReadWriteSplittingBackingMap(BackingMapManagerContext context, PartitionAwareBackingMap mapInternal, Map mapMisses, CacheLoader store, boolean fReadOnly, int cWriteBehindSeconds, double dflRefreshAheadFactor)
This method exposes a corresponding ReadWriteSplittingBackingMap
constructor
and is provided for the express purpose of allowing its override.
protected ReadWriteSplittingBackingMap instantiateReadWriteSplittingBackingMap(BackingMapManagerContext context, PartitionAwareBackingMap mapInternal, Map mapMisses, BinaryEntryStore storeBinary, boolean fReadOnly, int cWriteBehindSeconds, double dflRefreshAheadFactor)
This method exposes a corresponding ReadWriteSplittingBackingMap
constructor
and is provided for the express purpose of allowing its override.
protected Map instantiateVersionedBackingMap(DefaultConfigurableCacheFactory.CacheInfo info, XmlElement xmlVBM, BackingMapManagerContext context, Map mapListeners)
info
- the cache infoxmlVBM
- "versioned-backing-map-scheme" elementcontext
- BackingMapManagerContext to be usedmapListeners
- map of registered map listeners keyed by the
corresponding map referencesprotected VersionedBackingMap instantiateVersionedBackingMap(BackingMapManagerContext context, ObservableMap mapInternal, Map mapMisses, CacheStore store, boolean fReadOnly, int cWriteBehindSeconds, double dflRefreshAheadFactor, NamedCache mapVersionTransient, NamedCache mapVersionPersist, boolean fManageTransient)
This method exposes a corresponding VersionedBackingMap
constructor
and is provided for the express purpose of allowing its override.
protected VersionedBackingMap instantiateVersionedBackingMap(BackingMapManagerContext context, ObservableMap mapInternal, Map mapMisses, CacheLoader loader, NamedCache mapVersionTransient, NamedCache mapVersionPersist, boolean fManageTransient)
This method exposes a corresponding VersionedBackingMap
constructor
and is provided for the express purpose of allowing its override.
protected Map instantiateLocalCache(DefaultConfigurableCacheFactory.CacheInfo info, XmlElement xmlLocal, BackingMapManagerContext context, ClassLoader loader)
info
- the cache infoxmlLocal
- "local-scheme" elementcontext
- BackingMapManagerContext to be usedloader
- the ClassLoader to instantiate necessary classesprotected void configureUnitCalculator(XmlElement xmlCache, ConfigurableCacheMap cache, DefaultConfigurableCacheFactory.CacheInfo info, BackingMapManagerContext context, ClassLoader loader)
xmlCache
- cache scheme that may contain a "unit-calculator" elementcache
- the corresponding ConfigurableCacheMapinfo
- the cache infocontext
- BackingMapManagerContext to be usedloader
- the ClassLoader to instantiate necessary classesprotected LocalCache instantiateLocalCache(int cUnits, int cExpiryMillis)
This method exposes a corresponding LocalCache
constructor
and is provided for the express purpose of allowing its override.
cUnits
- high watermarkcExpiryMillis
- the expiry valueprotected Map instantiateOverflowBackingMap(DefaultConfigurableCacheFactory.CacheInfo info, XmlElement xmlOverflow, BackingMapManagerContext context, ClassLoader loader, Map mapListeners)
info
- the cache infoxmlOverflow
- "overflow-scheme" elementcontext
- BackingMapManagerContext to be usedloader
- the ClassLoader to instantiate necessary classesmapListeners
- map of registered map listeners keyed by the
corresponding map referencesprotected OverflowMap instantiateOverflowMap(ObservableMap mapFront, Map mapBack, boolean fExpiry)
This method exposes a corresponding OverflowMap
constructor
and is provided for the express purpose of allowing its override.
protected SimpleOverflowMap instantiateSimpleOverflowMap(ObservableMap mapFront, Map mapBack, Map mapMisses)
This method exposes a corresponding SimpleOverflowMap
constructor
and is provided for the express purpose of allowing its override.
protected Map instantiateDiskBackingMap(DefaultConfigurableCacheFactory.CacheInfo info, XmlElement xmlDisk, BackingMapManagerContext context, ClassLoader loader)
instantiateExternalBackingMap(com.tangosol.net.DefaultConfigurableCacheFactory.CacheInfo, com.tangosol.run.xml.XmlElement, com.tangosol.net.BackingMapManagerContext, java.lang.ClassLoader)
and
instantiatePagedExternalBackingMap(com.tangosol.net.DefaultConfigurableCacheFactory.CacheInfo, com.tangosol.run.xml.XmlElement, com.tangosol.net.BackingMapManagerContext, java.lang.ClassLoader)
info
- the cache infoxmlDisk
- "disk-scheme" elementcontext
- BackingMapManagerContext to be usedloader
- the ClassLoader to instantiate necessary classesprotected Map instantiateSerializationMap(BinaryStore store, boolean fBinaryMap, ClassLoader loader, int cHighUnits, int cExpiryMillis, String sSubclass, XmlElement xmlInitParams)
store
- a BinaryStore to use to write serialized data tofBinaryMap
- true if the only data written to the Map will
already be in Binary formloader
- the ClassLoader to use (if not a Binary map)cHighUnits
- the max size in units for the serialization cachecExpiryMillis
- the expiry time in milliseconds for the cachesSubclass
- the sub-class name (or "")xmlInitParams
- the init params for the sub-classprotected Map instantiateExternalBackingMap(DefaultConfigurableCacheFactory.CacheInfo info, XmlElement xmlExternal, BackingMapManagerContext context, ClassLoader loader)
info
- the cache infoxmlExternal
- "external-scheme" elementcontext
- BackingMapManagerContext to be usedloader
- the ClassLoader to instantiate necessary classesprotected Map instantiatePagedExternalBackingMap(DefaultConfigurableCacheFactory.CacheInfo info, XmlElement xmlPaged, BackingMapManagerContext context, ClassLoader loader)
info
- the cache infoxmlPaged
- "paged-external-scheme" elementcontext
- BackingMapManagerContext to be usedloader
- the ClassLoader to instantiate necessary classesprotected Map instantiateFlashJournalBackingMap(DefaultConfigurableCacheFactory.CacheInfo info, XmlElement xmlJournal, BackingMapManagerContext context, ClassLoader loader)
info
- the cache infoxmlJournal
- "flashjournal-scheme" elementcontext
- BackingMapManagerContext to be usedloader
- the ClassLoader to instantiate necessary classesprotected Map instantiateRamJournalBackingMap(DefaultConfigurableCacheFactory.CacheInfo info, XmlElement xmlJournal, BackingMapManagerContext context, ClassLoader loader)
info
- the cache infoxmlJournal
- "ramjournal-scheme" elementcontext
- BackingMapManagerContext to be usedloader
- the ClassLoader to instantiate necessary classesprotected BinaryStoreManager instantiateBinaryStoreManager(XmlElement xmlConfig, ClassLoader loader, boolean fPaged)
xmlConfig
- the XmlElement that contains the configuration info for
the BinaryStoreManager that will be instantiatedloader
- the ClassLoader to instantiate necessary classesfPaged
- flag indicating whether or not the returned
BinaryStoreManager will be used by a
SerializationPagedCacheprotected AsyncBinaryStore instantiateAsyncBinaryStore(BinaryStore store, int cbMaxAsync)
store
- the BinaryStore to make asynchronouscbMaxAsync
- the maximum amount of "async writes" data that will
be queuedprotected AsyncBinaryStoreManager instantiateAsyncBinaryStoreManager(BinaryStoreManager storeMgr, int cbMaxAsync)
storeMgr
- the BinaryStoreManager to make asynchronouscbMaxAsync
- the maximum amount of "async writes" data that will
be queuedprotected SerializationPagedCache instantiateSerializationPagedCache(BinaryStoreManager storeMgr, int cPages, int cPageSecs, ClassLoader loader)
This method exposes a corresponding SerializationPagedCache
constructor
and is provided for the express purpose of allowing its override.
protected SerializationPagedCache instantiateSerializationPagedCache(BinaryStoreManager storeMgr, int cPages, int cPageSecs, boolean fBinaryMap, boolean fPassive)
This method exposes a corresponding SerializationPagedCache
constructor
and is provided for the express purpose of allowing its override.
protected SerializationCache instantiateSerializationCache(BinaryStore store, int cMax, ClassLoader loader)
This method exposes a corresponding SerializationCache
constructor
and is provided for the express purpose of allowing its override.
protected SerializationCache instantiateSerializationCache(BinaryStore store, int cMax, boolean fBinaryMap)
This method exposes a corresponding SerializationCache
constructor
and is provided for the express purpose of allowing its override.
protected SerializationMap instantiateSerializationMap(BinaryStore store, ClassLoader loader)
This method exposes a corresponding SerializationMap
constructor
and is provided for the express purpose of allowing its override.
protected SerializationMap instantiateSerializationMap(BinaryStore store, boolean fBinaryMap)
This method exposes a corresponding SerializationMap
constructor
and is provided for the express purpose of allowing its override.
protected SimpleSerializationMap instantiateSimpleSerializationMap(BinaryStore store, ClassLoader loader)
This method exposes a corresponding SerializationMap constructor
and is provided for the express purpose of allowing its
override.
protected SimpleSerializationMap instantiateSimpleSerializationMap(BinaryStore store, boolean fBinaryMap)
This method exposes a corresponding SerializationMap constructor
and is provided for the express purpose of allowing its
override.
protected BundlingNamedCache instantiateBundlingNamedCache(NamedCache cache, XmlElement xmlBundling)
cache
- the wrapped cachexmlBundling
- the "operation-bundling" elementprotected void initializeBundler(AbstractBundler bundler, XmlElement xmlBundle)
bundler
- the bundlerxmlBundle
- a "bundle-config" elementprotected Map instantiateMap(DefaultConfigurableCacheFactory.CacheInfo info, XmlElement xmlClass, BackingMapManagerContext context, ClassLoader loader)
instantiateAny
.info
- the cache infoxmlClass
- "class-scheme" elementcontext
- BackingMapManagerContext to be usedloader
- the ClassLoader to instantiate necessary classesprotected Object instantiateCacheStore(DefaultConfigurableCacheFactory.CacheInfo info, XmlElement xmlStore, BackingMapManagerContext context, ClassLoader loader)
info
- the cache infoxmlStore
- "cachestore-scheme" element for the store or loadercontext
- BackingMapManagerContext to be usedloader
- the ClassLoader to instantiate necessary classesprotected MapListener instantiateMapListener(DefaultConfigurableCacheFactory.CacheInfo info, XmlElement xmlClass, BackingMapManagerContext context, ClassLoader loader)
info
- the cache infoxmlClass
- "class-scheme" elementcontext
- BackingMapManagerContext to be usedloader
- the ClassLoader to instantiate necessary classespublic Object instantiateAny(DefaultConfigurableCacheFactory.CacheInfo info, XmlElement xmlClass, BackingMapManagerContext context, ClassLoader loader)
If the value of any "param-value" element contains the literal
"{cache-name}", replace it with the actual cache name.
If the value of "param-value" element is "{class-loader}"
and "param-type" element is "java.lang.ClassLoader" replace it
with the current ClassLoader object.
If the value of "param-value" element is "{manager-context}"
and "param-type" element is "com.tangosol.net.BackingMapManagerContext"
replace it with the current BackingMapManagerContext object.
Finally, if the value of "param-type" is "{scheme-ref}" then the
"param-value" should be a name of the scheme that will be used in place
of the value.
info
- the cache infoxmlClass
- "class-scheme" elementcontext
- BackingMapManagerContext to be usedloader
- the ClassLoader to instantiate necessary classespublic Object instantiateSubclass(String sClass, Class clzSuper, ClassLoader loader, Object[] aoParam, XmlElement xmlParams)
sClass
- the class nameclzSuper
- the super class of the newly instantiated classloader
- the ClassLoader to instantiate necessary classesaoParam
- the constructor parametersxmlParams
- the "init-params" XmlElement (optional)public void release(Map map, Map mapListeners)
map
- the map being releasedmapListeners
- map of registered map listeners keyed by the
corresponding map referencesprotected void release(CacheLoader loader)
loader
- the cache loader being releasedprotected void release(BinaryStore store)
store
- the binary store being releasedprotected void releaseCache(NamedCache cache, boolean fDestroy)
cache
- the cache to releasefDestroy
- true to destroy the cache as wellpublic int translateSchemeType(String sScheme)
sScheme
- the scheme namepublic static int translateStandardSchemeType(String sScheme)
sScheme
- the scheme namepublic static boolean isPutAllOptimized(Map map)
putAll()
operation versus a regular
put()
operation.map
- a Map instance to checkpublic static boolean isCanonicalKeySupported(Map map)
map
- a Map instance to checkprotected static long getRequestTimeout(XmlElement xmlScheme)
XmlElement
.xmlScheme
- the xml scheme that stores the request timeoutprotected boolean isSerializerCompatible(Service serviceThis, Service serviceThat)
serviceThis
- the first ServiceserviceThat
- the second Serviceprotected void configureInterceptors(XmlElement xmlConfig)
Registry
.
Interceptors may exist in either the caching-scheme-mapping or within a distributed-scheme. The former allows restricting events based on cache named whilst the latter can be bound at service level.
xmlConfig
- the base cache configuration xmlprotected void registerInterceptor(XmlElement xmlInterceptor, String sCacheName, String sServiceName)
EventInterceptor
based on the
XML provided. Additionally the service and cache names will be passed
to the interceptor if possible. These values should be empty strings
if they are to be ignored.
This method will register the EventInterceptor
instantiated
with the events registry; Registry
.
xmlInterceptor
- the xml containing the definition of the
interceptorsCacheName
- the cache name or an empty stringsServiceName
- the service name or an empty stringIllegalArgumentException
- if a nested instance
or class-scheme is absent, an interceptor identifier
is missing or the EventInterceptor
implementation can
not be resolvedprotected void register(NamedCache cache, String sContext)
MBeanHelper.registerCacheMBean(NamedCache, String)
insteadcache
- the NamedCache object to registersContext
- the cache context (tier)protected void register(CacheService service, String sCacheName, String sContext, Map map)
MBeanHelper.registerCacheMBean(CacheService, String, String, Map)
insteadservice
- the CacheService that the cache belongs tosCacheName
- the cache namesContext
- the cache context (tier)map
- the cache object to registerprotected void unregister(CacheService service, String sCacheName)
MBeanHelper.unregisterCacheMBean(CacheService, String, String)
insteadservice
- the CacheService that the cache belongs tosCacheName
- the cache nameprotected void unregister(String sCacheName, String sContext)
MBeanHelper.unregisterCacheMBean(String, String)
insteadsCacheName
- the cache namesContext
- the cache context (tier)protected void pushCacheContext(String sContext)
sContext
- cache context (tag)protected String popCacheContext()
protected int convertInt(XmlValue xmlValue)
XmlValue
to an int. If the
conversion fails, a warning will be logged.xmlValue
- the element expected to contain an int valueprotected int convertInt(XmlValue xmlValue, int nDefault)
XmlValue
to an int. If the
conversion fails, a warning will be logged.xmlValue
- the element expected to contain an int valuenDefault
- the value that will be returned if the element does
not contain a value that can be converted to intprotected long convertLong(XmlValue xmlValue)
XmlValue
to a long. If the
conversion fails, a warning will be logged.xmlValue
- the element expected to contain a long valueprotected double convertDouble(XmlValue xmlValue)
XmlValue
to a double. If the
conversion fails, a warning will be logged.xmlValue
- the element expected to contain a double valueprotected void reportConversionError(XmlValue xmlValue, String sType, String sDefault, RuntimeException e)
xmlValue
- element that contains the value that failed conversionsType
- type that conversion was attempted tosDefault
- default value that will be substitutede
- root cause of failed type conversion