use of com.hazelcast.internal.nearcache.impl.invalidation.NonStopInvalidator in project hazelcast by hazelcast.
the class MapNearCacheManager method createInvalidator.
private Invalidator createInvalidator() {
HazelcastProperties hazelcastProperties = nodeEngine.getProperties();
int batchSize = hazelcastProperties.getInteger(MAP_INVALIDATION_MESSAGE_BATCH_SIZE);
int batchFrequencySeconds = hazelcastProperties.getInteger(MAP_INVALIDATION_MESSAGE_BATCH_FREQUENCY_SECONDS);
boolean batchingEnabled = hazelcastProperties.getBoolean(MAP_INVALIDATION_MESSAGE_BATCH_ENABLED) && batchSize > 1;
if (batchingEnabled) {
return new BatchInvalidator(SERVICE_NAME, batchSize, batchFrequencySeconds, INVALIDATION_ACCEPTOR, nodeEngine);
} else {
return new NonStopInvalidator(SERVICE_NAME, INVALIDATION_ACCEPTOR, nodeEngine);
}
}
use of com.hazelcast.internal.nearcache.impl.invalidation.NonStopInvalidator in project hazelcast by hazelcast.
the class NonStopInvalidatorTest method setUp.
@Before
public void setUp() {
key = mock(Data.class);
HazelcastInstance hz = createHazelcastInstance();
NodeEngineImpl nodeEngineImpl = getNodeEngineImpl(hz);
invalidator = new NonStopInvalidator(MapService.SERVICE_NAME, TRUE_FILTER, nodeEngineImpl);
}
use of com.hazelcast.internal.nearcache.impl.invalidation.NonStopInvalidator in project hazelcast by hazelcast.
the class CacheEventHandler method createInvalidator.
private Invalidator createInvalidator() {
HazelcastProperties hazelcastProperties = nodeEngine.getProperties();
int batchSize = hazelcastProperties.getInteger(CACHE_INVALIDATION_MESSAGE_BATCH_SIZE);
int batchFrequencySeconds = hazelcastProperties.getInteger(CACHE_INVALIDATION_MESSAGE_BATCH_FREQUENCY_SECONDS);
boolean batchingEnabled = hazelcastProperties.getBoolean(CACHE_INVALIDATION_MESSAGE_BATCH_ENABLED) && batchSize > 1;
if (batchingEnabled) {
return new BatchInvalidator(SERVICE_NAME, batchSize, batchFrequencySeconds, TRUE_FILTER, nodeEngine);
} else {
return new NonStopInvalidator(SERVICE_NAME, TRUE_FILTER, nodeEngine);
}
}
Aggregations