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, wait
sendInvalidationEvent
reset, shutdown
prepareReplicationOperation
protected 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)
ManagedService
init
in interface ManagedService
nodeEngine
- 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)
RemoteService
createDistributedObject
in interface RemoteService
objectName
- the name for the created distributed objectpublic void destroyDistributedObject(String objectName)
RemoteService
destroyDistributedObject
in interface RemoteService
objectName
- the name of the distributed object to destroypublic void beforeMigration(PartitionMigrationEvent event)
beforeMigration
in interface MigrationAwareService
public void commitMigration(PartitionMigrationEvent event)
commitMigration
in interface MigrationAwareService
public void rollbackMigration(PartitionMigrationEvent event)
rollbackMigration
in interface MigrationAwareService
public void clearPartitionReplica(int partitionId)
clearPartitionReplica
in interface MigrationAwareService
public ICacheRecordStore getOrCreateCache(String name, int partitionId)
getOrCreateCache
in interface ICacheService
public ICacheRecordStore getCacheRecordStore(String name, int partitionId)
getCacheRecordStore
in interface ICacheService
public CachePartitionSegment getSegment(int partitionId)
getSegment
in interface ICacheService
protected void destroySegments(String objectName)
public void destroyCache(String objectName, boolean isLocal, String callerUuid)
destroyCache
in interface ICacheService
protected void destroyCacheOnAllMembers(String objectName, String callerUuid)
public CacheConfig createCacheConfigIfAbsent(CacheConfig config)
createCacheConfigIfAbsent
in interface ICacheService
public CacheConfig deleteCacheConfig(String name)
deleteCacheConfig
in interface ICacheService
public CacheStatisticsImpl createCacheStatIfAbsent(String name)
createCacheStatIfAbsent
in interface ICacheService
public void deleteCacheStat(String name)
deleteCacheStat
in interface ICacheService
public void setStatisticsEnabled(CacheConfig cacheConfig, String cacheNameWithPrefix, boolean enabled)
setStatisticsEnabled
in interface ICacheService
public void setManagementEnabled(CacheConfig cacheConfig, String cacheNameWithPrefix, boolean enabled)
setManagementEnabled
in interface ICacheService
public CacheConfig getCacheConfig(String name)
getCacheConfig
in interface ICacheService
public CacheSimpleConfig findCacheConfig(String simpleName)
findCacheConfig
in interface ICacheService
protected <K,V> CacheConfig<K,V> getCacheConfigFromPartition(String cacheNameWithPrefix, String cacheName)
public Collection<CacheConfig> getCacheConfigs()
getCacheConfigs
in interface ICacheService
public void publishEvent(CacheEventContext cacheEventContext)
publishEvent
in interface ICacheService
public void publishEvent(String cacheName, CacheEventSet eventSet, int orderKey)
publishEvent
in interface ICacheService
public NodeEngine getNodeEngine()
getNodeEngine
in interface ICacheService
public void dispatchEvent(Object event, CacheEventListener listener)
dispatchEvent
in interface EventPublishingService<Object,CacheEventListener>
public String registerListener(String distributedObjectName, CacheEventListener listener)
registerListener
in interface ICacheService
public boolean deregisterListener(String name, String registrationId)
deregisterListener
in interface ICacheService
public void deregisterAllListener(String name)
deregisterAllListener
in interface ICacheService
public CacheStatisticsImpl getStatistics(String name)
getStatistics
in interface ICacheService
public CacheOperationProvider getCacheOperationProvider(String nameWithPrefix, InMemoryFormat inMemoryFormat)
ICacheService
getCacheOperationProvider
in interface ICacheService
public Operation getPostJoinOperation()
PostJoinAwareService
Post join operations should return response, at least a null response.
getPostJoinOperation
in interface PostJoinAwareService
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.