public class CoalescingDelayedTrigger
- extends Object
Coalescing trigger can be used when you want coalesce multiple execution of
Once you call the
executeWithDelay() it will wait specified amount of time before actually executing
the Runnable. If
executeWithDelay() is invoked again within the interval then the Runnable will
be executed only once.
It also guarantees no execution will be delayed more than specified maximum delay.
This class is not thread-safe and external synchronization must be ensured when multiple
threads are calling
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public CoalescingDelayedTrigger(ExecutionService executionService,
delay - execution delay in ms
maxDelay - maximum delay in ms. No action will be delayed more specified number of ms.
runnable - action to be executed
public void executeWithDelay()
- invoke delayed execution.
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.