Search in sources :

Example 6 with CacheEventHandler

use of com.hazelcast.cache.impl.CacheEventHandler in project hazelcast by hazelcast.

the class InvalidationMetadataDistortionTest method distortRandomPartitionUuid.

private void distortRandomPartitionUuid(HazelcastInstance member) {
    NodeEngineImpl nodeEngineImpl = getNodeEngineImpl(member);
    int partitionCount = nodeEngineImpl.getPartitionService().getPartitionCount();
    CacheService service = nodeEngineImpl.getService(CacheService.SERVICE_NAME);
    CacheEventHandler cacheEventHandler = service.getCacheEventHandler();
    MetaDataGenerator metaDataGenerator = cacheEventHandler.getMetaDataGenerator();
    UUID uuid = UuidUtil.newSecureUUID();
    int randomPartition = getInt(partitionCount);
    metaDataGenerator.setUuid(randomPartition, uuid);
}
Also used : NodeEngineImpl(com.hazelcast.spi.impl.NodeEngineImpl) CacheEventHandler(com.hazelcast.cache.impl.CacheEventHandler) MetaDataGenerator(com.hazelcast.internal.nearcache.impl.invalidation.MetaDataGenerator) UUID(java.util.UUID) CacheService(com.hazelcast.cache.impl.CacheService)

Example 7 with CacheEventHandler

use of com.hazelcast.cache.impl.CacheEventHandler in project hazelcast by hazelcast.

the class CacheAssignAndGetUuidsOperation method getMetaDataGenerator.

private MetaDataGenerator getMetaDataGenerator() {
    CacheService service = getService();
    CacheEventHandler cacheEventHandler = service.getCacheEventHandler();
    return cacheEventHandler.getMetaDataGenerator();
}
Also used : CacheEventHandler(com.hazelcast.cache.impl.CacheEventHandler) CacheService(com.hazelcast.cache.impl.CacheService)

Aggregations

CacheEventHandler (com.hazelcast.cache.impl.CacheEventHandler)7 CacheService (com.hazelcast.cache.impl.CacheService)6 MetaDataGenerator (com.hazelcast.internal.nearcache.impl.invalidation.MetaDataGenerator)5 NodeEngineImpl (com.hazelcast.spi.impl.NodeEngineImpl)4 InternalPartitionService (com.hazelcast.internal.partition.InternalPartitionService)2 CacheProxy (com.hazelcast.cache.impl.CacheProxy)1 HazelcastServerCachingProvider (com.hazelcast.cache.impl.HazelcastServerCachingProvider)1 ClientCacheProxy (com.hazelcast.client.cache.impl.ClientCacheProxy)1 HazelcastClientCachingProvider (com.hazelcast.client.cache.impl.HazelcastClientCachingProvider)1 ClientConfig (com.hazelcast.client.config.ClientConfig)1 HazelcastClientProxy (com.hazelcast.client.impl.HazelcastClientProxy)1 CacheConfig (com.hazelcast.config.CacheConfig)1 Config (com.hazelcast.config.Config)1 NearCacheConfig (com.hazelcast.config.NearCacheConfig)1 HazelcastInstance (com.hazelcast.core.HazelcastInstance)1 NearCacheRecord (com.hazelcast.internal.nearcache.NearCacheRecord)1 DefaultNearCache (com.hazelcast.internal.nearcache.impl.DefaultNearCache)1 MetaDataContainer (com.hazelcast.internal.nearcache.impl.invalidation.MetaDataContainer)1 AbstractNearCacheRecordStore (com.hazelcast.internal.nearcache.impl.store.AbstractNearCacheRecordStore)1 Data (com.hazelcast.nio.serialization.Data)1