public interface RpcClient extends Lifecycle<RpcOptions>
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
checkConnection(Endpoint endpoint)
Check connection for given address.
|
boolean |
checkConnection(Endpoint endpoint,
boolean createIfAbsent)
Check connection for given address and async to create a new one if there is no connection.
|
void |
closeConnection(Endpoint endpoint)
Close all connections of a address.
|
default void |
invokeAsync(Endpoint endpoint,
Object request,
InvokeCallback callback,
long timeoutMs)
Asynchronous invocation with a callback.
|
void |
invokeAsync(Endpoint endpoint,
Object request,
InvokeContext ctx,
InvokeCallback callback,
long timeoutMs)
Asynchronous invocation with a callback.
|
Object |
invokeSync(Endpoint endpoint,
Object request,
InvokeContext ctx,
long timeoutMs)
Synchronous invocation using a invoke context.
|
default Object |
invokeSync(Endpoint endpoint,
Object request,
long timeoutMs)
Synchronous invocation.
|
void |
registerConnectEventListener(ReplicatorGroup replicatorGroup)
Register a connect event listener for the replicator group.
|
boolean checkConnection(Endpoint endpoint)
endpoint - target addressboolean checkConnection(Endpoint endpoint, boolean createIfAbsent)
endpoint - target addresscreateIfAbsent - create a new one if there is no connectionvoid closeConnection(Endpoint endpoint)
endpoint - target addressvoid registerConnectEventListener(ReplicatorGroup replicatorGroup)
replicatorGroup - replicator groupdefault Object invokeSync(Endpoint endpoint, Object request, long timeoutMs) throws InterruptedException, RemotingException
endpoint - target addressrequest - request objecttimeoutMs - timeout millisecondInterruptedExceptionRemotingExceptionObject invokeSync(Endpoint endpoint, Object request, InvokeContext ctx, long timeoutMs) throws InterruptedException, RemotingException
endpoint - target addressrequest - request objectctx - invoke contexttimeoutMs - timeout millisecondInterruptedExceptionRemotingExceptiondefault void invokeAsync(Endpoint endpoint, Object request, InvokeCallback callback, long timeoutMs) throws InterruptedException, RemotingException
endpoint - target addressrequest - request objectcallback - invoke callbacktimeoutMs - timeout millisecondInterruptedExceptionRemotingExceptionvoid invokeAsync(Endpoint endpoint, Object request, InvokeContext ctx, InvokeCallback callback, long timeoutMs) throws InterruptedException, RemotingException
endpoint - target addressrequest - request objectctx - invoke contextcallback - invoke callbacktimeoutMs - timeout millisecondInterruptedExceptionRemotingExceptionCopyright © 2021. All rights reserved.