Class FencedPekkoInvocationHandler<F extends Serializable>

    • Field Detail

      • isLocal

        protected final boolean isLocal
      • forceRpcInvocationSerialization

        protected final boolean forceRpcInvocationSerialization
    • Constructor Detail

      • 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 Detail

      • tell

        public void tell​(Object message)
        Sends the message to the RPC endpoint.
        Parameters:
        message - to send to the RPC endpoint.
      • ask

        public CompletableFuture<?> ask​(Object message,
                                        Duration timeout)
        Sends the message to the RPC endpoint and returns a future containing its response.
        Parameters:
        message - to send to the RPC endpoint
        timeout - time to wait until the response future is failed with a TimeoutException
        Returns:
        Response future
      • getActorRef

        public org.apache.pekko.actor.ActorRef getActorRef()
      • runAsync

        public void runAsync​(Runnable runnable)
        Description copied from interface: MainThreadExecutable
        Execute the runnable in the main thread of the underlying RPC endpoint.
        Specified by:
        runAsync in interface MainThreadExecutable
        Parameters:
        runnable - Runnable to be executed
      • scheduleRunAsync

        public void scheduleRunAsync​(Runnable runnable,
                                     long delayMillis)
        Description copied from interface: MainThreadExecutable
        Execute the runnable in the main thread of the underlying RPC endpoint, with a delay of the given number of milliseconds.
        Specified by:
        scheduleRunAsync in interface MainThreadExecutable
        Parameters:
        runnable - Runnable to be executed
        delayMillis - The delay, in milliseconds, after which the runnable will be executed
      • callAsync

        public <V> CompletableFuture<V> callAsync​(Callable<V> callable,
                                                  Duration callTimeout)
        Description copied from interface: MainThreadExecutable
        Execute the callable in the main thread of the underlying RPC endpoint and return a future for the callable result. If the future is not completed within the given timeout, the returned future will throw a TimeoutException.
        Specified by:
        callAsync in interface MainThreadExecutable
        Type Parameters:
        V - Return value of the callable
        Parameters:
        callable - Callable to be executed
        callTimeout - Timeout for the future to complete
        Returns:
        Future of the callable result
      • start

        public void start()
        Description copied from interface: StartStoppable
        Starts the processing of remote procedure calls.
        Specified by:
        start in interface StartStoppable
      • stop

        public void stop()
        Description copied from interface: StartStoppable
        Stops the processing of remote procedure calls.
        Specified by:
        stop in interface StartStoppable
      • getAddress

        public String getAddress()
        Description copied from interface: RpcGateway
        Returns the fully qualified address under which the associated rpc endpoint is reachable.
        Specified by:
        getAddress in interface RpcGateway
        Returns:
        Fully qualified (RPC) address under which the associated rpc endpoint is reachable
      • getHostname

        public String getHostname()
        Description copied from interface: RpcGateway
        Returns the fully qualified hostname under which the associated rpc endpoint is reachable.
        Specified by:
        getHostname in interface RpcGateway
        Returns:
        Fully qualified hostname under which the associated rpc endpoint is reachable
      • getTerminationFuture

        public CompletableFuture<Void> getTerminationFuture()
        Description copied from interface: RpcServer
        Return a future which is completed when the rpc endpoint has been terminated.
        Specified by:
        getTerminationFuture in interface RpcServer
        Returns:
        Future indicating when the rpc endpoint has been terminated