public static interface RPCProxyFactory.Builder<T>
限定符和类型 | 方法和说明 |
---|---|
RPCProxyFactory.Builder<T> |
addSerializers(CommonSerializer<?>... serializers)
添加序列化器,可多次调用
|
T |
build()
构建
|
RPCProxyFactory.Builder<T> |
setAsync(boolean async)
是否异步调用,默认为false
|
RPCProxyFactory.Builder<T> |
setClusterLock(ClusterLock lock)
设置集群锁
默认为全局锁,即所有机器的所有RPC都串行执行
如不需要加锁,需手动setClusterLock(null)
加锁策略见文档:http://www.finedevelop.com/pages/viewpage.action?
|
RPCProxyFactory.Builder<T> |
setCustomInvokeStrategy(RPCInvokeStrategy invokeStrategy)
自定义调用策略,如果定义了这个组件,async、invokeLocalFirst的设置将忽略
|
RPCProxyFactory.Builder<T> |
setInvokeFilter(Filter<Invocation> filter)
自定义选择某个调用是否需要广播,默认实现的所有接口中定义的方法都调用
|
RPCProxyFactory.Builder<T> |
setInvokeLocalFirst(boolean invokeLocalFirst)
是否先调用本机方法,默认为false,即默认先调用远端方法(异步时是先发送请求)
|
RPCProxyFactory.Builder<T> |
setResultHandler(RemoteResultHandler resultHandler)
结果处理器
|
RPCProxyFactory.Builder<T> |
setTimeout(long timeout)
设置超时时间
|
RPCProxyFactory.Builder<T> setInvokeFilter(Filter<Invocation> filter)
RPCProxyFactory.Builder<T> setClusterLock(ClusterLock lock)
RPCProxyFactory.Builder<T> setTimeout(long timeout)
RPCProxyFactory.Builder<T> setResultHandler(RemoteResultHandler resultHandler)
RPCProxyFactory.Builder<T> addSerializers(CommonSerializer<?>... serializers)
RPCProxyFactory.Builder<T> setAsync(boolean async)
RPCProxyFactory.Builder<T> setInvokeLocalFirst(boolean invokeLocalFirst)
RPCProxyFactory.Builder<T> setCustomInvokeStrategy(RPCInvokeStrategy invokeStrategy)
T build()