protected static class RpcEndpoint.MainThreadExecutor extends Object implements ComponentMainThreadExecutor, Closeable
ComponentMainThreadExecutor.DummyComponentMainThreadExecutor| 限定符和类型 | 方法和说明 |
|---|---|
void |
assertRunningInMainThread()
Returns true if the method was called in the thread of this executor.
|
void |
close()
Shutdown the
ScheduledThreadPoolExecutor and remove all the pending tasks. |
void |
execute(Runnable command) |
<V> ScheduledFuture<V> |
schedule(Callable<V> callable,
long delay,
TimeUnit unit)
The mainScheduledExecutor manages the given callable and sends it to the gateway after
the given delay.
|
ScheduledFuture<?> |
schedule(Runnable command,
long delay,
TimeUnit unit)
The mainScheduledExecutor manages the task and sends it to the gateway after the given
delay.
|
ScheduledFuture<?> |
scheduleAtFixedRate(Runnable command,
long initialDelay,
long period,
TimeUnit unit) |
ScheduledFuture<?> |
scheduleWithFixedDelay(Runnable command,
long initialDelay,
long delay,
TimeUnit unit) |
public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
schedule 在接口中 org.apache.flink.util.concurrent.ScheduledExecutorcommand - the task to execute in the futuredelay - the time from now to delay the executionunit - the time unit of the delay parameterpublic <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit)
schedule 在接口中 org.apache.flink.util.concurrent.ScheduledExecutorV - result type of the callablecallable - the callable to executedelay - the time from now to delay the executionunit - the time unit of the delay parameterpublic ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
scheduleAtFixedRate 在接口中 org.apache.flink.util.concurrent.ScheduledExecutorpublic ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
scheduleWithFixedDelay 在接口中 org.apache.flink.util.concurrent.ScheduledExecutorpublic void assertRunningInMainThread()
ComponentMainThreadExecutorpublic void close()
ScheduledThreadPoolExecutor and remove all the pending tasks.close 在接口中 Closeableclose 在接口中 AutoCloseableCopyright © 2014–2023 The Apache Software Foundation. All rights reserved.