public class EnterpriseCacheService
extends com.hazelcast.cache.impl.CacheService
implements com.hazelcast.spi.ReplicationSupportingService, com.hazelcast.spi.hotrestart.RamStoreRegistry
ICacheService implementation specified for enterprise usage.
This EnterpriseCacheService implementation mainly handles
ICacheRecordStore creation of caches with specified partition ID
When interacting with Hot Restart persistent stores, cache configurations must be persisted in the serialized form of
PreJoinCacheConfig.
cacheContexts, cacheContextsConstructorFunction, cacheEventHandler, cacheResourcesConstructorFunction, cacheResourcesMutexFactory, cacheStatisticsConstructorFunction, clearExpiredRecordsTask, closeableListeners, configs, eventJournal, expirationManager, logger, mergePolicyProvider, nodeEngine, operationProviderCache, resources, segments, splitBrainHandlerService, statistics, TENANT_CONTROL_FACTORY| Constructor and Description |
|---|
EnterpriseCacheService() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearAll(int originalPartitionId)
Clears all record stores on the partitions owned by partition thread of original partition.
|
protected com.hazelcast.cache.impl.ICacheRecordStore |
createNewRecordStore(String cacheNameWithPrefix,
int partitionId)
Creates new
ICacheRecordStore as specified InMemoryFormat. |
protected com.hazelcast.cache.impl.CacheOperationProvider |
createOperationProvider(String cacheNameWithPrefix,
com.hazelcast.config.InMemoryFormat inMemoryFormat)
Creates a
CacheOperationProvider as specified InMemoryFormat
for specified cacheNameWithPrefix. |
com.hazelcast.config.CacheConfig |
deleteCacheConfig(String cacheNameWithPrefix) |
protected void |
destroySegments(com.hazelcast.config.CacheConfig cacheConfig)
Destroys the segments for specified cache.
|
int |
forceEvict(String name,
int originalPartitionId)
Does forced eviction on one or more caches.
|
int |
forceEvictOnAll(int originalPartitionId)
Does forced eviction on all caches.
|
int |
forceEvictOnOthers(String name,
int originalPartitionId)
Does forced eviction on other caches.
|
com.hazelcast.cache.impl.CacheOperationProvider |
getCacheOperationProvider(String cacheNameWithPrefix,
com.hazelcast.config.InMemoryFormat inMemoryFormat) |
com.hazelcast.cache.impl.event.CacheWanEventPublisher |
getCacheWanEventPublisher() |
HiDensityStorageInfo |
getOrCreateHiDensityCacheInfo(String cacheNameWithPrefix)
Gets or creates (if there is no cache info for that Hi-Density cache)
HiDensityStorageInfo instance
which holds live information about cache. |
EnterpriseSerializationService |
getSerializationService()
Gets the
EnterpriseSerializationService used by this ICacheService. |
boolean |
isWanReplicationEnabled(String cacheNameWithPrefix) |
protected com.hazelcast.cache.impl.operation.CacheReplicationOperation |
newCacheReplicationOperation()
Creates a
HiDensityCacheReplicationOperation to start the replication. |
com.hazelcast.spi.hotrestart.HotRestartStore |
offHeapHotRestartStoreForPartition(int partitionId) |
com.hazelcast.spi.hotrestart.HotRestartStore |
onHeapHotRestartStoreForPartition(int partitionId) |
void |
onReplicationEvent(com.hazelcast.wan.WanReplicationEvent wanReplicationEvent) |
protected void |
postInit(com.hazelcast.spi.NodeEngine nodeEngine,
Properties properties) |
int |
prefixToThreadId(long prefix) |
void |
publishWanEvent(com.hazelcast.cache.impl.CacheEventContext cacheEventContext) |
void |
publishWanEvent(String cacheNameWithPrefix,
com.hazelcast.wan.WanReplicationEvent wanReplicationEvent)
Publishes a WAN event for the provided
cacheNameWithPrefix if there
is a publisher initialized for the cache. |
com.hazelcast.config.CacheConfig |
putCacheConfigIfAbsent(com.hazelcast.config.CacheConfig config) |
com.hazelcast.spi.hotrestart.RamStore |
ramStoreForPrefix(long prefix) |
void |
reset()
Resets the cache service without closing.
|
com.hazelcast.spi.hotrestart.RamStore |
restartingRamStoreForPrefix(long prefix) |
void |
shutdown(boolean terminate)
Shutdowns the cache service and destroy the caches with their segments.
|
commitMigration, getAllServiceNamespaces, getObjectNamespace, isKnownServiceNamespace, newPartitionSegment, prepareReplicationOperation, prepareReplicationOperation, rollbackMigration, toStringaddCacheResource, addInvalidationListener, beforeMigration, cacheEntryListenerDeregistered, cacheEntryListenerRegistered, closeSegments, createCacheConfigOnAllMembers, createCacheConfigOnAllMembersAsync, createCacheStatIfAbsent, createDistributedObject, deleteCache, deleteCacheResources, deleteCacheStat, deregisterAllListener, deregisterListener, destroyDistributedObject, dispatchEvent, findCacheConfig, getCacheConfig, getCacheConfigs, getCacheContext, getCacheEventHandler, getConfigs, getEventJournal, getExpirationManager, getMergePolicy, getMergePolicyProvider, getNodeEngine, getOrCreateCacheContext, getOrCreateRecordStore, getPartitionSegments, getPreJoinOperation, getQuorumName, getRecordStore, getSegment, getStatistics, init, onClusterStateChange, onPartitionLost, prepareMergeRunnable, publishCachePartitionLostEvent, publishEvent, publishEvent, registerListener, registerListener, registerListenerInternal, sendInvalidationEvent, setManagementEnabled, setStatisticsEnabled, setTenantControl, toData, toObjectprotected void postInit(com.hazelcast.spi.NodeEngine nodeEngine,
Properties properties)
postInit in class com.hazelcast.cache.impl.AbstractCacheServicepublic com.hazelcast.spi.hotrestart.RamStore ramStoreForPrefix(long prefix)
ramStoreForPrefix in interface com.hazelcast.spi.hotrestart.RamStoreRegistrypublic com.hazelcast.spi.hotrestart.RamStore restartingRamStoreForPrefix(long prefix)
restartingRamStoreForPrefix in interface com.hazelcast.spi.hotrestart.RamStoreRegistrypublic int prefixToThreadId(long prefix)
prefixToThreadId in interface com.hazelcast.spi.hotrestart.RamStoreRegistrypublic com.hazelcast.spi.hotrestart.HotRestartStore onHeapHotRestartStoreForPartition(int partitionId)
public com.hazelcast.spi.hotrestart.HotRestartStore offHeapHotRestartStoreForPartition(int partitionId)
protected com.hazelcast.cache.impl.ICacheRecordStore createNewRecordStore(String cacheNameWithPrefix, int partitionId)
ICacheRecordStore as specified InMemoryFormat.createNewRecordStore in class com.hazelcast.cache.impl.CacheServicecacheNameWithPrefix - the full name of the cache, including the manager scope prefixpartitionId - the partition ID which cache record store is created onICacheRecordStoreCacheRecordStore,
HiDensityNativeMemoryCacheRecordStoreprotected void destroySegments(com.hazelcast.config.CacheConfig cacheConfig)
destroySegments in class com.hazelcast.cache.impl.AbstractCacheServicecacheConfig - the configuration of the cache whose segments will be destroyedpublic void shutdown(boolean terminate)
shutdown in interface com.hazelcast.spi.ManagedServiceshutdown in class com.hazelcast.cache.impl.AbstractCacheServiceterminate - condition about cache service will be closed or notpublic void reset()
reset in interface com.hazelcast.spi.ManagedServicereset in class com.hazelcast.cache.impl.AbstractCacheServicepublic int forceEvict(String name, int originalPartitionId)
name - the name of the cache to be evictedoriginalPartitionId - the partition ID of the record store stores the records of cachepublic int forceEvictOnOthers(String name, int originalPartitionId)
name - the name of the cache not to be evicted.originalPartitionId - the partition ID of the record store that stores the records of cachepublic int forceEvictOnAll(int originalPartitionId)
originalPartitionId - the partition ID of the record store that stores the records of cachepublic void clearAll(int originalPartitionId)
originalPartitionId - the ID of original partitionprotected com.hazelcast.cache.impl.operation.CacheReplicationOperation newCacheReplicationOperation()
HiDensityCacheReplicationOperation to start the replication.newCacheReplicationOperation in class com.hazelcast.cache.impl.CacheServiceprotected com.hazelcast.cache.impl.CacheOperationProvider createOperationProvider(String cacheNameWithPrefix, com.hazelcast.config.InMemoryFormat inMemoryFormat)
CacheOperationProvider as specified InMemoryFormat
for specified cacheNameWithPrefix.createOperationProvider in class com.hazelcast.cache.impl.CacheServicecacheNameWithPrefix - the name of the cache (including manager prefix) that operation works oninMemoryFormat - the format of memory such as BINARY, OBJECT
or NATIVEpublic com.hazelcast.cache.impl.CacheOperationProvider getCacheOperationProvider(String cacheNameWithPrefix, com.hazelcast.config.InMemoryFormat inMemoryFormat)
getCacheOperationProvider in interface com.hazelcast.cache.impl.ICacheServicegetCacheOperationProvider in class com.hazelcast.cache.impl.AbstractCacheServicepublic EnterpriseSerializationService getSerializationService()
EnterpriseSerializationService used by this ICacheService.EnterpriseSerializationServicepublic HiDensityStorageInfo getOrCreateHiDensityCacheInfo(String cacheNameWithPrefix)
HiDensityStorageInfo instance
which holds live information about cache.cacheNameWithPrefix - Name (including prefix) of the cache whose live information is requestedHiDensityStorageInfo instance which holds live information about Hi-Density cachepublic com.hazelcast.config.CacheConfig putCacheConfigIfAbsent(com.hazelcast.config.CacheConfig config)
putCacheConfigIfAbsent in interface com.hazelcast.cache.impl.ICacheServiceputCacheConfigIfAbsent in class com.hazelcast.cache.impl.AbstractCacheServicepublic com.hazelcast.config.CacheConfig deleteCacheConfig(String cacheNameWithPrefix)
deleteCacheConfig in interface com.hazelcast.cache.impl.ICacheServicedeleteCacheConfig in class com.hazelcast.cache.impl.AbstractCacheServicepublic void onReplicationEvent(com.hazelcast.wan.WanReplicationEvent wanReplicationEvent)
onReplicationEvent in interface com.hazelcast.spi.ReplicationSupportingServicepublic void publishWanEvent(com.hazelcast.cache.impl.CacheEventContext cacheEventContext)
public void publishWanEvent(String cacheNameWithPrefix, com.hazelcast.wan.WanReplicationEvent wanReplicationEvent)
cacheNameWithPrefix if there
is a publisher initialized for the cache. It is possible that the publisher has
not been initialised yet for this cache which means that the event may not be published
at this point but may be published at a later point.cacheNameWithPrefix - the full name of the cache, including the manager scope prefixwanReplicationEvent - the WAN event to be publishedpublic boolean isWanReplicationEnabled(String cacheNameWithPrefix)
isWanReplicationEnabled in interface com.hazelcast.cache.impl.ICacheServiceisWanReplicationEnabled in class com.hazelcast.cache.impl.CacheServicepublic com.hazelcast.cache.impl.event.CacheWanEventPublisher getCacheWanEventPublisher()
getCacheWanEventPublisher in interface com.hazelcast.cache.impl.ICacheServicegetCacheWanEventPublisher in class com.hazelcast.cache.impl.CacheServiceCopyright © 2021 Hazelcast, Inc.. All Rights Reserved.