RpcEndpoint¶
RpcEndpoint is an abstraction of RPC endpoints that are registered to an RpcEnv to process one- (fire-and-forget) or two-way messages.
Contract¶
onConnected¶
onConnected(
remoteAddress: RpcAddress): Unit
Invoked when RpcAddress is connected to the current node
Used when:
Inboxis requested to process aRemoteProcessConnectedmessage
onDisconnected¶
onDisconnected(
remoteAddress: RpcAddress): Unit
Used when:
Inboxis requested to process aRemoteProcessDisconnectedmessage
onError¶
onError(
cause: Throwable): Unit
Used when:
Inboxis requested to process a message that threw aNonFatalexception
onNetworkError¶
onNetworkError(
cause: Throwable,
remoteAddress: RpcAddress): Unit
Used when:
Inboxis requested to process aRemoteProcessConnectionErrormessage
onStart¶
onStart(): Unit
Used when:
Inboxis requested to process anOnStartmessage
onStop¶
onStop(): Unit
Used when:
Inboxis requested to process anOnStopmessage
Processing One-Way Messages¶
receive: PartialFunction[Any, Unit]
Used when:
Inboxis requested to process anOneWayMessagemessage
Processing Two-Way Messages¶
receiveAndReply(
context: RpcCallContext): PartialFunction[Any, Unit]
Used when:
Inboxis requested to process aRpcMessagemessage
RpcEnv¶
rpcEnv: RpcEnv
RpcEnv this RpcEndpoint is registered to
Implementations¶
- AMEndpoint
- IsolatedRpcEndpoint
- MapOutputTrackerMasterEndpoint
- OutputCommitCoordinatorEndpoint
- RpcEndpointVerifier
- ThreadSafeRpcEndpoint
- WorkerWatcher
self¶
self: RpcEndpointRef
self requests the RpcEnv for the RpcEndpointRef of this RpcEndpoint.
self throws an IllegalArgumentException when the RpcEnv has not been initialized:
rpcEnv has not been initialized
Stopping RpcEndpoint¶
stop(): Unit
stop requests the RpcEnv to stop this RpcEndpoint