public interface RPCInvokeStrategy
限定符和类型 | 方法和说明 |
---|---|
java.lang.Object |
invoke(ClusterInvoker invoker,
java.lang.Object localTarget,
Invocation invocation,
RemoteResultHandler remoteHandler)
定义调用策略
例:
public Object invoke(ClusterInvoker invoker, Object localTarget, Invocation invocation, RemoteResultHandler remoteHandler) throws Throwable {
Object result = invocation.getMethod().invoke(localTarget);
invoker.invokeAll(invocation, RemoteResultHandlerHelper.newAdaptor(remoteHandler));
return result;
}
|
java.lang.Object invoke(ClusterInvoker invoker, java.lang.Object localTarget, Invocation invocation, RemoteResultHandler remoteHandler) throws java.lang.Throwable
java.lang.Throwable