public abstract class AbstractCacheService extends Object implements ICacheService
Modifier and Type | Field and Description |
---|---|
protected ConstructorFunction<String,CacheStatisticsImpl> |
cacheStatisticsConstructorFunction |
protected ConcurrentMap<String,CacheConfig> |
configs |
protected NodeEngine |
nodeEngine |
protected ConcurrentMap<String,CacheOperationProvider> |
operationProviderCache |
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
reset, shutdown
prepareReplicationOperation
protected final ConcurrentMap<String,CacheConfig> configs
protected final ConcurrentMap<String,CacheStatisticsImpl> statistics
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 this ManagedService belongs to.properties
- the Properties. Can be used to pass settings to the service.protected abstract ICacheRecordStore createNewRecordStore(String name, int partitionId)
public DistributedObject createDistributedObject(String objectName)
createDistributedObject
in interface RemoteService
public void destroyDistributedObject(String objectName)
destroyDistributedObject
in interface RemoteService
public 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, boolean isLocal)
createCacheConfigIfAbsent
in interface ICacheService
protected <K,V> void createConfigOnAllMembers(CacheConfig<K,V> cacheConfig)
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)
public Collection<CacheConfig> getCacheConfigs()
getCacheConfigs
in interface ICacheService
public void publishEvent(String cacheName, CacheEventType eventType, Data dataKey, Data dataValue, Data dataOldValue, boolean isOldValueAvailable, int orderKey, int completionId)
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
Copyright © 2014 Hazelcast, Inc.. All Rights Reserved.