use of com.hazelcast.internal.util.scheduler.CoalescingDelayedTrigger in project hazelcast by hazelcast.
the class MapKeyLoader method triggerLoadingWithDelay.
/**
* Triggers key loading on SENDER if it hadn't started. Delays triggering if invoked multiple times.
*/
public void triggerLoadingWithDelay() {
if (delayedTrigger == null) {
Runnable runnable = () -> {
Operation op = new TriggerLoadIfNeededOperation(mapName);
opService.invokeOnPartition(SERVICE_NAME, op, mapNamePartition);
};
delayedTrigger = new CoalescingDelayedTrigger(execService, LOADING_TRIGGER_DELAY, LOADING_TRIGGER_DELAY, runnable);
}
delayedTrigger.executeWithDelay();
}
Aggregations