com.hazelcast.cache.impl
Class CacheService

java.lang.Object
  extended by com.hazelcast.cache.impl.AbstractCacheService
      extended by 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:

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().


Field Summary
 
Fields inherited from class com.hazelcast.cache.impl.AbstractCacheService
cacheStatisticsConstructorFunction, configs, nodeEngine, operationProviderCache, segments, statistics
 
Fields inherited from interface com.hazelcast.cache.impl.ICacheService
SERVICE_NAME
 
Constructor Summary
CacheService()
           
 
Method Summary
protected  ICacheRecordStore createNewRecordStore(String name, int partitionId)
           
 Operation prepareReplicationOperation(PartitionReplicationEvent event)
           
 void reset()
          reset this ManagedService back to initial state.
 void shutdown(boolean terminate)
          Shuts down this ManagedService.
 
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
 
Methods inherited from interface com.hazelcast.spi.ManagedService
init
 
Methods inherited from interface com.hazelcast.spi.RemoteService
createDistributedObject, destroyDistributedObject
 
Methods inherited from interface com.hazelcast.spi.MigrationAwareService
beforeMigration, clearPartitionReplica, commitMigration, rollbackMigration
 
Methods inherited from interface com.hazelcast.spi.EventPublishingService
dispatchEvent
 

Constructor Detail

CacheService

public CacheService()
Method Detail

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.