Class KeyedExecutor<K>
java.lang.Object
com.atlassian.crowd.manager.webhook.KeyedExecutor<K>
A task executor that discards tasks if there is another existing task with the same key queued for execution.
Keys must be valid Map keys, i.e., they must be immutable and have equals() and hashMap().
- Since:
- v2.7
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
KeyedExecutor
-
-
Method Details
-
execute
Adds a Runnable to the executor queue. If there is another Runnable with the same key that is awaiting its execution, then the new Runnable is discarded.- Parameters:
runnable
- the runnable task.key
- task key. Must be immutable and have equals() and hashMap().
-