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:
Inbox
is requested to process aRemoteProcessConnected
message
onDisconnected¶
onDisconnected(
remoteAddress: RpcAddress): Unit
Used when:
Inbox
is requested to process aRemoteProcessDisconnected
message
onError¶
onError(
cause: Throwable): Unit
Used when:
Inbox
is requested to process a message that threw aNonFatal
exception
onNetworkError¶
onNetworkError(
cause: Throwable,
remoteAddress: RpcAddress): Unit
Used when:
Inbox
is requested to process aRemoteProcessConnectionError
message
onStart¶
onStart(): Unit
Used when:
Inbox
is requested to process anOnStart
message
onStop¶
onStop(): Unit
Used when:
Inbox
is requested to process anOnStop
message
Processing One-Way Messages¶
receive: PartialFunction[Any, Unit]
Used when:
Inbox
is requested to process anOneWayMessage
message
Processing Two-Way Messages¶
receiveAndReply(
context: RpcCallContext): PartialFunction[Any, Unit]
Used when:
Inbox
is requested to process aRpcMessage
message
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