|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BackingMapManager
A callback interface used by CacheService implementations. By providing a custom implementation of this interface, it is possible to use an alternative underlying store for the cached data.
A custom implementation may return a LocalCache
in order to size-restrict the cache or force automatic expiry of cached data.
Currently, the "Distributed" and "Optimistic" CacheService implementations accept custom implementations of the BackingMapManager.
If the BackingMapManager object also implements XmlConfigurable
interface then the XmlConfigurable.setConfig(XmlElement)
method on it is called every time the configuration xml is changed by other cluster members.
Very important note: all methods of this interface are called on a thread associated with the corresponding CacheService and any significant delay will negatively affect the performance of this service around the cluster.
Method Summary | |
---|---|
ConfigurableCacheFactory |
getCacheFactory() Obtain the "container" ConfigurableCacheFactory that created this manager and which this manager is bound to. |
BackingMapManagerContext |
getContext() Determine the current BackingMapManagerContext for this BackingMapManager. |
void |
init(BackingMapManagerContext context) Called by a CacheService to indicate to this manager that the manager is being associated with the CacheService. |
java.util.Map |
instantiateBackingMap(java.lang.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. |
boolean |
isBackingMapPersistent(java.lang.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. |
void |
releaseBackingMap(java.lang.String sName, java.util.Map map) Release the specified Map that was created using the instantiateBackingMap(String) method. |
Method Detail |
---|
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.
context
- the BackingMapManagerContext object for this BackingMapManagerConfigurableCacheFactory getCacheFactory()
BackingMapManagerContext getContext()
java.util.Map instantiateBackingMap(java.lang.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 createdboolean isBackingMapPersistent(java.lang.String sName)
sName
- the name of the NamedCachevoid releaseBackingMap(java.lang.String sName, java.util.Map map)
instantiateBackingMap(String)
method. This method is invoked by the CacheService when the CacheService no longer requires the specified Map object.sName
- the name of the NamedCache for which the specified Map object has acted as the backing mapmap
- the Map object that is being released
|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |