use of com.hazelcast.spi.impl.NodeEngineImpl in project hazelcast by hazelcast.
the class QueueStoreWrapper method instrument.
void instrument(NodeEngine nodeEngine) {
Diagnostics diagnostics = ((NodeEngineImpl) nodeEngine).getDiagnostics();
StoreLatencyPlugin storeLatencyPlugin = diagnostics.getPlugin(StoreLatencyPlugin.class);
if (!enabled || storeLatencyPlugin == null) {
return;
}
this.store = new LatencyTrackingQueueStore(store, storeLatencyPlugin, name);
}
use of com.hazelcast.spi.impl.NodeEngineImpl in project hazelcast by hazelcast.
the class InvalidationMetadataDistortionTest method distortRandomPartitionSequence.
private void distortRandomPartitionSequence(String mapName, HazelcastInstance member) {
NodeEngineImpl nodeEngineImpl = getNodeEngineImpl(member);
CacheService service = nodeEngineImpl.getService(CacheService.SERVICE_NAME);
CacheEventHandler cacheEventHandler = service.getCacheEventHandler();
MetaDataGenerator metaDataGenerator = cacheEventHandler.getMetaDataGenerator();
InternalPartitionService partitionService = nodeEngineImpl.getPartitionService();
int partitionCount = partitionService.getPartitionCount();
int randomPartition = getInt(partitionCount);
int randomSequence = getInt(MAX_VALUE);
metaDataGenerator.setCurrentSequence(mapName, randomPartition, randomSequence);
}
use of com.hazelcast.spi.impl.NodeEngineImpl in project hazelcast by hazelcast.
the class ClientCacheMetaDataFetcherTest method distortRandomPartitionSequence.
private void distortRandomPartitionSequence(String cacheName, int partition, long sequence, HazelcastInstance member) {
NodeEngineImpl nodeEngineImpl = getNodeEngineImpl(member);
CacheService service = nodeEngineImpl.getService(SERVICE_NAME);
CacheEventHandler cacheEventHandler = service.getCacheEventHandler();
MetaDataGenerator metaDataGenerator = cacheEventHandler.getMetaDataGenerator();
metaDataGenerator.setCurrentSequence(cacheName, partition, sequence);
}
use of com.hazelcast.spi.impl.NodeEngineImpl in project hazelcast by hazelcast.
the class ClientMapMetaDataFetcherTest method distortRandomPartitionSequence.
private void distortRandomPartitionSequence(String mapName, int partition, long sequence, HazelcastInstance member) {
NodeEngineImpl nodeEngineImpl = getNodeEngineImpl(member);
MapService mapService = nodeEngineImpl.getService(SERVICE_NAME);
MapServiceContext mapServiceContext = mapService.getMapServiceContext();
MapNearCacheManager mapNearCacheManager = mapServiceContext.getMapNearCacheManager();
Invalidator invalidator = mapNearCacheManager.getInvalidator();
MetaDataGenerator metaDataGenerator = invalidator.getMetaDataGenerator();
metaDataGenerator.setCurrentSequence(mapName, partition, sequence);
}
use of com.hazelcast.spi.impl.NodeEngineImpl in project hazelcast by hazelcast.
the class DefaultNodeExtension method createMapService.
private <T> T createMapService() {
ConstructorFunction<NodeEngine, MapService> constructor = getDefaultMapServiceConstructor();
NodeEngineImpl nodeEngine = node.getNodeEngine();
return (T) constructor.createNew(nodeEngine);
}
Aggregations