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 a
ActorSystem as a ScheduledExecutor. Furthermore ensures that the
context class loader is set to the Flink class loader while the runnable is running.-
Constructor Summary
ConstructorsConstructorDescriptionActorSystemScheduledExecutorAdapter(org.apache.pekko.actor.ActorSystem actorSystem, ClassLoader flinkClassLoader) -
Method Summary
Modifier and TypeMethodDescriptionvoid<V> ScheduledFuture<V>scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
-
Constructor Details
-
ActorSystemScheduledExecutorAdapter
public ActorSystemScheduledExecutorAdapter(org.apache.pekko.actor.ActorSystem actorSystem, ClassLoader flinkClassLoader)
-
-
Method Details
-
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
-
execute
-