public static class SwtExec.Blocking extends SwtExec
SwtExec.blocking()) which adds a blocking get() method.
execute(Runnable) is called from the SWT thread, the Runnable will be executed immediately.Runnable will be passed to Display.syncExec.SwtExec.blockingSwtExec.Blocking, SwtExec.Guardeddisplay, rxExecutor, scheduler| Modifier and Type | Method and Description |
|---|---|
void |
execute(Runnable runnable)
Executes the given command at some time in the future.
|
<T> T |
get(Supplier<T> supplier)
Performs a blocking get in the UI thread.
|
<V> ScheduledFuture<V> |
schedule(Callable<V> callable,
long delay,
TimeUnit unit)
Creates and executes a ScheduledFuture that becomes enabled after the
given delay.
|
ScheduledFuture<?> |
schedule(Runnable command,
long delay,
TimeUnit unit)
Creates and executes a one-shot action that becomes enabled
after the given delay.
|
ScheduledFuture<?> |
scheduleAtFixedRate(Runnable command,
long initialDelay,
long period,
TimeUnit unit)
Creates and executes a periodic action that becomes enabled first
after the given initial delay, and subsequently with the given
period; that is executions will commence after initialDelay then initialDelay+period, then initialDelay + 2 * period, and so on.
|
ScheduledFuture<?> |
scheduleWithFixedDelay(Runnable command,
long initialDelay,
long delay,
TimeUnit unit)
Creates and executes a periodic action that becomes enabled first
after the given initial delay, and subsequently with the
given delay between the termination of one execution and the
commencement of the next.
|
async, awaitTermination, blocking, getRxExecutor, getRxScheduler, guardOn, guardOn, immediate, isShutdown, isTerminated, shutdown, shutdownNow, timerExecinvokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submitpublic void execute(Runnable runnable)
SwtExecpublic <T> T get(Supplier<T> supplier)
supplier - will be executed in the UI thread.public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
SwtExecschedule in interface ScheduledExecutorServiceschedule in class SwtExeccommand - the task to executedelay - the time from now to delay executionunit - the time unit of the delay parameterpublic <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit)
SwtExecschedule in interface ScheduledExecutorServiceschedule in class SwtExeccallable - the function to executedelay - the time from now to delay executionunit - the time unit of the delay parameterpublic ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
SwtExecscheduleAtFixedRate in interface ScheduledExecutorServicescheduleAtFixedRate in class SwtExeccommand - the task to executeinitialDelay - the time to delay first executionperiod - the period between successive executionsunit - the time unit of the initialDelay and period parameterspublic ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
SwtExecscheduleWithFixedDelay in interface ScheduledExecutorServicescheduleWithFixedDelay in class SwtExeccommand - the task to executeinitialDelay - the time to delay first executiondelay - the delay between the termination of one
execution and the commencement of the nextunit - the time unit of the initialDelay and delay parameters