com.hazelcast.cache.impl
Class CacheService
java.lang.Object
com.hazelcast.cache.impl.AbstractCacheService
com.hazelcast.cache.impl.CacheService
- All Implemented Interfaces:
- ICacheService, EventPublishingService<Object,CacheEventListener>, ManagedService, MigrationAwareService, RemoteService
public class CacheService
- extends AbstractCacheService
- implements ICacheService
Cache Service is the main access point of JCache implementation.
This service is responsible for:
- Creating and/or accessing the named
CacheRecordStore
.
- Creating/Deleting the cache configuration of the named
ICache
.
- Registering/Deregistering of cache listeners.
- Publish/dispatch cache events.
- Enabling/Disabling statistic and management.
- Data migration commit/rollback through
MigrationAwareService
.
WARNING:This service is an optionally registered service which is enabled when Caching
class is found on the classpath.
If registered, it will provide all the above cache operations for all partitions of the node which it
is registered on.
Distributed Cache Name is used for providing a unique name to a cache object to overcome cache manager
scoping which depends on URI and class loader parameters. It's a simple concatenation of CacheNamePrefix and
cache name where CacheNamePrefix is calculated by each cache manager
using AbstractHazelcastCacheManager.cacheNamePrefix()
.
Methods inherited from class com.hazelcast.cache.impl.AbstractCacheService |
beforeMigration, clearPartitionReplica, commitMigration, createCacheConfigIfAbsent, createCacheStatIfAbsent, createDistributedObject, deleteCacheConfig, deleteCacheStat, deregisterAllListener, deregisterListener, destroyCache, destroyCacheOnAllMembers, destroyDistributedObject, destroySegments, dispatchEvent, findCacheConfig, getCacheConfig, getCacheConfigFromPartition, getCacheConfigs, getCacheOperationProvider, getCacheRecordStore, getNodeEngine, getOrCreateCache, getSegment, getStatistics, init, publishEvent, publishEvent, registerListener, rollbackMigration, setManagementEnabled, setStatisticsEnabled, toData, toObject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.hazelcast.cache.impl.ICacheService |
createCacheConfigIfAbsent, createCacheStatIfAbsent, deleteCacheConfig, deleteCacheStat, deregisterAllListener, deregisterListener, destroyCache, findCacheConfig, getCacheConfig, getCacheConfigs, getCacheOperationProvider, getCacheRecordStore, getNodeEngine, getOrCreateCache, getSegment, getStatistics, publishEvent, publishEvent, registerListener, setManagementEnabled, setStatisticsEnabled |
CacheService
public CacheService()
createNewRecordStore
protected ICacheRecordStore createNewRecordStore(String name,
int partitionId)
- Specified by:
createNewRecordStore
in class AbstractCacheService
reset
public void reset()
- Description copied from interface:
ManagedService
- reset this ManagedService back to initial state.
todo: what is the purpose of reset
- Specified by:
reset
in interface ManagedService
shutdown
public void shutdown(boolean terminate)
- Description copied from interface:
ManagedService
- Shuts down this ManagedService.
todo: what is the purpose of the terminate variable.
- Specified by:
shutdown
in interface ManagedService
prepareReplicationOperation
public Operation prepareReplicationOperation(PartitionReplicationEvent event)
- Specified by:
prepareReplicationOperation
in interface MigrationAwareService
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.