use of com.hazelcast.internal.nearcache.impl.invalidation.BatchInvalidator 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.BatchInvalidator 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