com.hazelcast.cache.impl
Class HazelcastServerCacheManager

java.lang.Object
  extended by com.hazelcast.cache.impl.AbstractHazelcastCacheManager
      extended by com.hazelcast.cache.impl.HazelcastServerCacheManager
All Implemented Interfaces:
HazelcastCacheManager, Closeable, javax.cache.CacheManager

public class HazelcastServerCacheManager
extends AbstractHazelcastCacheManager

Hazelcast CacheManager for server implementation. This subclass of AbstractHazelcastCacheManager is managed by HazelcastServerCachingProvider.

As it lives on a node JVM, it has reference to CacheService and NodeEngine where this manager make calls.

When JCache server implementation is configured, an instance of this class will be returned when CachingProvider.getCacheManager() is called.


Field Summary
 
Fields inherited from class com.hazelcast.cache.impl.AbstractHazelcastCacheManager
cacheNamePrefix, caches, cachingProvider, classLoaderReference, hazelcastInstance, isDefaultClassLoader, isDefaultURI, properties, uri
 
Constructor Summary
HazelcastServerCacheManager(HazelcastServerCachingProvider cachingProvider, HazelcastInstance hazelcastInstance, URI uri, ClassLoader classLoader, Properties properties)
           
 
Method Summary
protected
<K,V> void
addCacheConfigIfAbsent(CacheConfig<K,V> cacheConfig)
           
protected
<K,V> ICache<K,V>
createCacheProxy(CacheConfig<K,V> cacheConfig)
           
protected
<K,V> CacheConfig<K,V>
createConfig(String cacheName, CacheConfig<K,V> config, boolean createAlsoOnOthers, boolean syncCreate)
           
protected
<K,V> CacheConfig<K,V>
createConfigOnPartition(CacheConfig<K,V> cacheConfig)
           
 void enableManagement(String cacheName, boolean enabled)
           
 void enableStatistics(String cacheName, boolean enabled)
           
protected
<K,V> CacheConfig<K,V>
findConfig(String cacheName, String simpleCacheName, boolean createAlsoOnOthers, boolean syncCreate)
           
protected
<K,V> CacheConfig<K,V>
getCacheConfigFromPartition(String cacheNameWithPrefix, String cacheName)
           
protected
<K,V> CacheConfig<K,V>
getCacheConfigLocal(String cacheName)
           
 ICacheService getCacheService()
           
protected  void postClose()
           
protected  void removeCacheConfigFromLocal(String cacheName)
          Removes the local copy of the cache configuration if one exists.
<T> T
unwrap(Class<T> clazz)
           
 
Methods inherited from class com.hazelcast.cache.impl.AbstractHazelcastCacheManager
cacheNamePrefix, checkIfManagerNotClosed, close, createCache, createCacheConfig, destroy, destroyCache, getCache, getCache, getCacheNames, getCacheNameWithPrefix, getCacheUnchecked, getCachingProvider, getClassLoader, getProperties, getURI, isClosed, registerListeners, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HazelcastServerCacheManager

public HazelcastServerCacheManager(HazelcastServerCachingProvider cachingProvider,
                                   HazelcastInstance hazelcastInstance,
                                   URI uri,
                                   ClassLoader classLoader,
                                   Properties properties)
Method Detail

enableManagement

public void enableManagement(String cacheName,
                             boolean enabled)

enableStatistics

public void enableStatistics(String cacheName,
                             boolean enabled)

getCacheConfigLocal

protected <K,V> CacheConfig<K,V> getCacheConfigLocal(String cacheName)
Specified by:
getCacheConfigLocal in class AbstractHazelcastCacheManager

createConfigOnPartition

protected <K,V> CacheConfig<K,V> createConfigOnPartition(CacheConfig<K,V> cacheConfig)
Specified by:
createConfigOnPartition in class AbstractHazelcastCacheManager

addCacheConfigIfAbsent

protected <K,V> void addCacheConfigIfAbsent(CacheConfig<K,V> cacheConfig)
Specified by:
addCacheConfigIfAbsent in class AbstractHazelcastCacheManager

findConfig

protected <K,V> CacheConfig<K,V> findConfig(String cacheName,
                                            String simpleCacheName,
                                            boolean createAlsoOnOthers,
                                            boolean syncCreate)
Specified by:
findConfig in class AbstractHazelcastCacheManager

createConfig

protected <K,V> CacheConfig<K,V> createConfig(String cacheName,
                                              CacheConfig<K,V> config,
                                              boolean createAlsoOnOthers,
                                              boolean syncCreate)
Specified by:
createConfig in class AbstractHazelcastCacheManager

createCacheProxy

protected <K,V> ICache<K,V> createCacheProxy(CacheConfig<K,V> cacheConfig)
Specified by:
createCacheProxy in class AbstractHazelcastCacheManager

getCacheConfigFromPartition

protected <K,V> CacheConfig<K,V> getCacheConfigFromPartition(String cacheNameWithPrefix,
                                                             String cacheName)
Specified by:
getCacheConfigFromPartition in class AbstractHazelcastCacheManager

removeCacheConfigFromLocal

protected void removeCacheConfigFromLocal(String cacheName)
Description copied from class: AbstractHazelcastCacheManager
Removes the local copy of the cache configuration if one exists. Default implementation does not require it. But client implementation overrides this to track a local copy of the config.

Overrides:
removeCacheConfigFromLocal in class AbstractHazelcastCacheManager
Parameters:
cacheName - cache name.

unwrap

public <T> T unwrap(Class<T> clazz)

postClose

protected void postClose()
Specified by:
postClose in class AbstractHazelcastCacheManager

getCacheService

public ICacheService getCacheService()


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.