Class ActorSystemScheduledExecutorAdapter
- java.lang.Object
-
- org.apache.flink.runtime.concurrent.pekko.ActorSystemScheduledExecutorAdapter
-
- All Implemented Interfaces:
Executor,org.apache.flink.util.concurrent.ScheduledExecutor
public final class ActorSystemScheduledExecutorAdapter extends Object implements org.apache.flink.util.concurrent.ScheduledExecutor
Adapter to use aActorSystemas aScheduledExecutor. Furthermore ensures that the context class loader is set to the Flink class loader while the runnable is running.
-
-
Constructor Summary
Constructors Constructor Description ActorSystemScheduledExecutorAdapter(org.apache.pekko.actor.ActorSystem actorSystem, ClassLoader flinkClassLoader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute(Runnable command)ScheduledFuture<?>schedule(Runnable command, long delay, TimeUnit unit)<V> ScheduledFuture<V>schedule(Callable<V> callable, long delay, TimeUnit unit)ScheduledFuture<?>scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)ScheduledFuture<?>scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
-
-
-
Constructor Detail
-
ActorSystemScheduledExecutorAdapter
public ActorSystemScheduledExecutorAdapter(org.apache.pekko.actor.ActorSystem actorSystem, ClassLoader flinkClassLoader)
-
-
Method Detail
-
schedule
@Nonnull public ScheduledFuture<?> schedule(@Nonnull Runnable command, long delay, @Nonnull TimeUnit unit)
- Specified by:
schedulein interfaceorg.apache.flink.util.concurrent.ScheduledExecutor
-
schedule
@Nonnull public <V> ScheduledFuture<V> schedule(@Nonnull Callable<V> callable, long delay, @Nonnull TimeUnit unit)
- Specified by:
schedulein interfaceorg.apache.flink.util.concurrent.ScheduledExecutor
-
scheduleAtFixedRate
@Nonnull public ScheduledFuture<?> scheduleAtFixedRate(@Nonnull Runnable command, long initialDelay, long period, @Nonnull TimeUnit unit)
- Specified by:
scheduleAtFixedRatein interfaceorg.apache.flink.util.concurrent.ScheduledExecutor
-
scheduleWithFixedDelay
@Nonnull public ScheduledFuture<?> scheduleWithFixedDelay(@Nonnull Runnable command, long initialDelay, long delay, @Nonnull TimeUnit unit)
- Specified by:
scheduleWithFixedDelayin interfaceorg.apache.flink.util.concurrent.ScheduledExecutor
-
-