Class FencedPekkoInvocationHandler<F extends Serializable>
java.lang.Object
org.apache.flink.runtime.rpc.pekko.FencedPekkoInvocationHandler<F>
- Type Parameters:
F- type of the fencing token
- All Implemented Interfaces:
InvocationHandler,org.apache.flink.runtime.rpc.FencedRpcGateway<F>,org.apache.flink.runtime.rpc.MainThreadExecutable,org.apache.flink.runtime.rpc.RpcGateway,org.apache.flink.runtime.rpc.RpcServer,org.apache.flink.runtime.rpc.StartStoppable
public class FencedPekkoInvocationHandler<F extends Serializable>
extends Object
implements org.apache.flink.runtime.rpc.MainThreadExecutable, org.apache.flink.runtime.rpc.FencedRpcGateway<F>
Fenced extension of the
PekkoInvocationHandler. This invocation handler will be used in
combination with the FencedRpcEndpoint. The fencing is done by wrapping all messages in a
FencedMessage.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanprotected final boolean -
Constructor Summary
ConstructorsConstructorDescriptionFencedPekkoInvocationHandler(String address, String hostname, org.apache.pekko.actor.ActorRef rpcEndpoint, Duration timeout, long maximumFramesize, boolean forceRpcInvocationSerialization, CompletableFuture<Void> terminationFuture, Supplier<F> fencingTokenSupplier, boolean captureAskCallStacks, ClassLoader flinkClassLoader) -
Method Summary
Modifier and TypeMethodDescriptionSends the message to the RPC endpoint and returns a future containing its response.<V> CompletableFuture<V>org.apache.pekko.actor.ActorRefvoidvoidscheduleRunAsync(Runnable runnable, long delayMillis) voidstart()voidstop()voidSends the message to the RPC endpoint.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.flink.runtime.rpc.MainThreadExecutable
callAsync, runAsync, scheduleRunAsyncMethods inherited from interface org.apache.flink.runtime.rpc.RpcGateway
getAddress, getHostname
-
Field Details
-
isLocal
protected final boolean isLocal -
forceRpcInvocationSerialization
protected final boolean forceRpcInvocationSerialization
-
-
Constructor Details
-
FencedPekkoInvocationHandler
public FencedPekkoInvocationHandler(String address, String hostname, org.apache.pekko.actor.ActorRef rpcEndpoint, Duration timeout, long maximumFramesize, boolean forceRpcInvocationSerialization, @Nullable CompletableFuture<Void> terminationFuture, Supplier<F> fencingTokenSupplier, boolean captureAskCallStacks, ClassLoader flinkClassLoader)
-
-
Method Details
-
invoke
- Specified by:
invokein interfaceInvocationHandler- Throws:
Throwable
-
tell
Sends the message to the RPC endpoint.- Parameters:
message- to send to the RPC endpoint.
-
ask
Sends the message to the RPC endpoint and returns a future containing its response.- Parameters:
message- to send to the RPC endpointtimeout- time to wait until the response future is failed with aTimeoutException- Returns:
- Response future
-
getFencingToken
- Specified by:
getFencingTokenin interfaceorg.apache.flink.runtime.rpc.FencedRpcGateway<F extends Serializable>
-
getActorRef
public org.apache.pekko.actor.ActorRef getActorRef() -
runAsync
- Specified by:
runAsyncin interfaceorg.apache.flink.runtime.rpc.MainThreadExecutable
-
scheduleRunAsync
- Specified by:
scheduleRunAsyncin interfaceorg.apache.flink.runtime.rpc.MainThreadExecutable
-
callAsync
- Specified by:
callAsyncin interfaceorg.apache.flink.runtime.rpc.MainThreadExecutable
-
start
public void start()- Specified by:
startin interfaceorg.apache.flink.runtime.rpc.StartStoppable
-
stop
public void stop()- Specified by:
stopin interfaceorg.apache.flink.runtime.rpc.StartStoppable
-
getAddress
- Specified by:
getAddressin interfaceorg.apache.flink.runtime.rpc.RpcGateway
-
getHostname
- Specified by:
getHostnamein interfaceorg.apache.flink.runtime.rpc.RpcGateway
-
getTerminationFuture
- Specified by:
getTerminationFuturein interfaceorg.apache.flink.runtime.rpc.RpcServer
-