public class CoalescentExecutor extends Object
| Constructor and Description |
|---|
CoalescentExecutor(String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
invokeAsLateAsPossibleWithCoalescence(CoalescentRunnable runnable)
Like
invokeLaterWithCoalescence, but defers invocation until the
last scheduled task on the event queue is processed. |
void |
shutdownNow() |
void |
submitNonCoalescent(Runnable r) |
void |
submitWithCoalescence(CoalescentRunnable runnable)
Invoke the given runnable on the EDT, coalescing multiple invocations on
the event queue.
|
public CoalescentExecutor(String name)
public void shutdownNow()
public void submitNonCoalescent(Runnable r)
public void submitWithCoalescence(CoalescentRunnable runnable)
RepaintManager, without having to replace the system
global event queue via EventQueue.push.
The given runnable is scheduled to run on the EDT, just as with
SwingUtilities.invokeLater, but when invoked, all outstanding
runnables with the same "coalescence class" (see
CoalescentRunnable.getCoalescenceClass) will be coalesced and the result
will be run.runnable - the coalescent runnable to invoke on the EDTpublic void invokeAsLateAsPossibleWithCoalescence(CoalescentRunnable runnable)
invokeLaterWithCoalescence, but defers invocation until the
last scheduled task on the event queue is processed.
Note that if you keep calling this method at a higher rate than the EDT is
processing events, the runnable will not be executed until the EDT becomes
otherwise idle.runnable - the coalescent runnable to invoke on the EDTCopyright © 2023. All rights reserved.