com.hazelcast.cache.impl
public abstract class AbstractCacheService extends Object implements ICacheService, PostJoinAwareService
| Modifier and Type | Field and Description |
|---|---|
protected ConstructorFunction<String,CacheStatisticsImpl> |
cacheStatisticsConstructorFunction |
protected ConcurrentMap<String,Closeable> |
closeableListeners |
protected ConcurrentMap<String,CacheConfig> |
configs |
protected NodeEngine |
nodeEngine |
protected ConcurrentMap<String,CacheOperationProvider> |
operationProviderCache |
protected ConcurrentMap<String,Set<Closeable>> |
resources |
protected CachePartitionSegment[] |
segments |
protected ConcurrentMap<String,CacheStatisticsImpl> |
statistics |
SERVICE_NAME| Constructor and Description |
|---|
AbstractCacheService() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsendInvalidationEventreset, shutdownprepareReplicationOperationprotected final ConcurrentMap<String,CacheConfig> configs
protected final ConcurrentMap<String,CacheStatisticsImpl> statistics
protected final ConcurrentMap<String,Set<Closeable>> resources
protected final ConcurrentMap<String,Closeable> closeableListeners
protected final ConcurrentMap<String,CacheOperationProvider> operationProviderCache
protected final ConstructorFunction<String,CacheStatisticsImpl> cacheStatisticsConstructorFunction
protected NodeEngine nodeEngine
protected CachePartitionSegment[] segments
public final void init(NodeEngine nodeEngine, Properties properties)
ManagedServiceinit in interface ManagedServicenodeEngine - the NodeEngine that this ManagedService belongs to.properties - the Properties. Can be used to pass settings to the service.protected void postInit(NodeEngine nodeEngine, Properties properties)
protected abstract ICacheRecordStore createNewRecordStore(String name, int partitionId)
public DistributedObject createDistributedObject(String objectName)
RemoteServicecreateDistributedObject in interface RemoteServiceobjectName - the name for the created distributed objectpublic void destroyDistributedObject(String objectName)
RemoteServicedestroyDistributedObject in interface RemoteServiceobjectName - the name of the distributed object to destroypublic void beforeMigration(PartitionMigrationEvent event)
beforeMigration in interface MigrationAwareServicepublic void commitMigration(PartitionMigrationEvent event)
commitMigration in interface MigrationAwareServicepublic void rollbackMigration(PartitionMigrationEvent event)
rollbackMigration in interface MigrationAwareServicepublic void clearPartitionReplica(int partitionId)
clearPartitionReplica in interface MigrationAwareServicepublic ICacheRecordStore getOrCreateCache(String name, int partitionId)
getOrCreateCache in interface ICacheServicepublic ICacheRecordStore getCacheRecordStore(String name, int partitionId)
getCacheRecordStore in interface ICacheServicepublic CachePartitionSegment getSegment(int partitionId)
getSegment in interface ICacheServiceprotected void destroySegments(String objectName)
public void destroyCache(String objectName, boolean isLocal, String callerUuid)
destroyCache in interface ICacheServiceprotected void destroyCacheOnAllMembers(String objectName, String callerUuid)
public CacheConfig createCacheConfigIfAbsent(CacheConfig config)
createCacheConfigIfAbsent in interface ICacheServicepublic CacheConfig deleteCacheConfig(String name)
deleteCacheConfig in interface ICacheServicepublic CacheStatisticsImpl createCacheStatIfAbsent(String name)
createCacheStatIfAbsent in interface ICacheServicepublic void deleteCacheStat(String name)
deleteCacheStat in interface ICacheServicepublic void setStatisticsEnabled(CacheConfig cacheConfig, String cacheNameWithPrefix, boolean enabled)
setStatisticsEnabled in interface ICacheServicepublic void setManagementEnabled(CacheConfig cacheConfig, String cacheNameWithPrefix, boolean enabled)
setManagementEnabled in interface ICacheServicepublic CacheConfig getCacheConfig(String name)
getCacheConfig in interface ICacheServicepublic CacheSimpleConfig findCacheConfig(String simpleName)
findCacheConfig in interface ICacheServiceprotected <K,V> CacheConfig<K,V> getCacheConfigFromPartition(String cacheNameWithPrefix, String cacheName)
public Collection<CacheConfig> getCacheConfigs()
getCacheConfigs in interface ICacheServicepublic void publishEvent(CacheEventContext cacheEventContext)
publishEvent in interface ICacheServicepublic void publishEvent(String cacheName, CacheEventSet eventSet, int orderKey)
publishEvent in interface ICacheServicepublic NodeEngine getNodeEngine()
getNodeEngine in interface ICacheServicepublic void dispatchEvent(Object event, CacheEventListener listener)
dispatchEvent in interface EventPublishingService<Object,CacheEventListener>public String registerListener(String distributedObjectName, CacheEventListener listener)
registerListener in interface ICacheServicepublic boolean deregisterListener(String name, String registrationId)
deregisterListener in interface ICacheServicepublic void deregisterAllListener(String name)
deregisterAllListener in interface ICacheServicepublic CacheStatisticsImpl getStatistics(String name)
getStatistics in interface ICacheServicepublic CacheOperationProvider getCacheOperationProvider(String nameWithPrefix, InMemoryFormat inMemoryFormat)
ICacheServicegetCacheOperationProvider in interface ICacheServicepublic Operation getPostJoinOperation()
PostJoinAwareServicePost join operations should return response, at least a null response.
getPostJoinOperation in interface PostJoinAwareServiceCopyright © 2015 Hazelcast, Inc.. All Rights Reserved.