Class DefaultConfigurableCacheFactory.Manager

    • Field Detail

      • m_mapBackingMap

        protected Map m_mapBackingMap
        The map of backing maps keyed by corresponding cache names.
      • m_mapBackingMapListeners

        protected Map m_mapBackingMapListeners
        The map of backing map listeners keyed by the corresponding backing map references.
    • Constructor Detail

      • Manager

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

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

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

        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.

        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
      • isBackingMapPersistent

        public 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.
        Parameters:
        sName - the name of the NamedCache
        Returns:
        true if the CacheService should persist the backing storage of the specified NamedCache
      • isBackingMapSlidingExpiry

        public 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.
        Parameters:
        sName - the name of the NamedCache
        Returns:
        true if the backing map of the specified NamedCache enables the sliding expiry
      • getBackingMap

        public Map getBackingMap​(String sName)
        Get the backing Map associated with a given cache.
        Parameters:
        sName - the cache name
        Returns:
        a Map associated with the specified name
      • setBackingMap

        protected void setBackingMap​(String sName,
                                     Map map)
        Associate the specified backing Map with a given name.
        Parameters:
        sName - the cache name
        map - the backing map associated 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