Package org.n52.janmayen
Class Debouncer
java.lang.Object
org.n52.janmayen.Debouncer
Postpones a operation until a configurable amount of time is passed without further requests for the operation.
- Since:
- 1.0.0
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Debouncer
Creates a newDebouncer.- Parameters:
interval- the interval to wait for new calls.runnable- the task to execute
-
-
Method Details
-
call
public void call()Request the execution of the operation. -
finish
public void finish()Shut thisDebouncerdown by executing any pending request. Note: further calls to this class are undefined.
-