public class 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().
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void execute(Runnable runnable,
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.
runnable - the runnable task.
key - task key. Must be immutable and have equals() and hashMap().
Copyright © 2021 Atlassian. All rights reserved.