org.rx.net.rpc.RpcClientPool Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rxlib Show documentation
Show all versions of rxlib Show documentation
A set of utilities for Java
package org.rx.net.rpc;
import org.rx.net.rpc.impl.NonClientPool;
import org.rx.net.rpc.impl.RpcClientPoolImpl;
import org.rx.net.rpc.impl.StatefulRpcClient;
public interface RpcClientPool {
static RpcClientPool createPool(RpcClientConfig config) {
if (!config.isUsePool()) {
return new NonClientPool(config);
}
return new RpcClientPoolImpl(config);
}
StatefulRpcClient borrowClient();
StatefulRpcClient returnClient(StatefulRpcClient client);
}