Oracle® Coherence Java API Reference
v3.5.3

E15583-01

com.tangosol.net
Class DefaultConfigurableCacheFactory.Manager

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.net.AbstractBackingMapManager
          extended by com.tangosol.net.DefaultConfigurableCacheFactory.Manager
All Implemented Interfaces:
BackingMapManager
Enclosing class:
DefaultConfigurableCacheFactory

public class DefaultConfigurableCacheFactory.Manager
extends AbstractBackingMapManager

BackingMapManager implementation that uses the configuration XML to create the required backing maps and provides client access to those maps.


Constructor Summary
DefaultConfigurableCacheFactory.Manager()
           
 
Method Summary
 java.util.Map getBackingMap(java.lang.String sName)
          Get the backing Map assosiated with a given cache.
 DefaultConfigurableCacheFactory getCacheFactory()
          Obtain the "container" DefaultConfigurableCacheFactory that created this manager and which this manager is bound to.
 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.
 void releaseBackingMap(java.lang.String sName, java.util.Map map)
          Release the specified Map that was created using the instantiateBackingMap(String) method.
protected  void setBackingMap(java.lang.String sName, java.util.Map map)
          Assosiate the specifeid backing Map with a given name.
 
Methods inherited from class com.tangosol.net.AbstractBackingMapManager
getContext
 

Constructor Detail

DefaultConfigurableCacheFactory.Manager

public DefaultConfigurableCacheFactory.Manager()
Method Detail

init

public void init(BackingMapManagerContext context)
Called by a CacheService to indicate to this manager that the manager is being associated with the CacheService. This method is called once immediately upon the startup of the CacheService, before any NamedCache objects are created by the CacheService.

Important note: BackingMapManager cannot be assosiated 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.

Specified by:
init in interface BackingMapManager
Overrides:
init in class AbstractBackingMapManager
Parameters:
context - the BackingMapManagerContext object for this BackingMapManager

instantiateBackingMap

public 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.

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.

Specified by:
instantiateBackingMap in interface BackingMapManager
Specified by:
instantiateBackingMap in class AbstractBackingMapManager
Parameters:
sName - the name of the NamedCache for which this backing map is being created
Returns:
an object implementing the Map interface that will provide backing storage for the specified cache name

releaseBackingMap

public void releaseBackingMap(java.lang.String sName,
                              java.util.Map map)
Release the specified Map that was created using the instantiateBackingMap(String) method. This method is invoked by the CacheService when the CacheService no longer requires the specified Map object.

Specified by:
releaseBackingMap in interface BackingMapManager
Overrides:
releaseBackingMap in class AbstractBackingMapManager
Parameters:
sName - the name of the NamedCache for which the specified Map object has acted as the backing map
map - the Map object that is being released

getBackingMap

public java.util.Map getBackingMap(java.lang.String sName)
Get the backing Map assosiated with a given cache.

Parameters:
sName - the cache name
Returns:
a Map assosiated with the specified name

setBackingMap

protected void setBackingMap(java.lang.String sName,
                             java.util.Map map)
Assosiate the specifeid backing Map with a given name.

Parameters:
sName - the cache name
map - the backing map assosiated with the specified name

getCacheFactory

public DefaultConfigurableCacheFactory getCacheFactory()
Obtain the "container" DefaultConfigurableCacheFactory that created this manager and which this manager is bound to.

Returns:
the DefaultConfigurableCacheFactory that created this manager

Oracle® Coherence Java API Reference
v3.5.3

E15583-01

Copyright © 2000, 2010, Oracle. All rights reserved.