List of usage examples for org.apache.commons.pool PoolUtils adapt
public static ObjectPool adapt(final KeyedObjectPool keyedPool, final Object key) throws IllegalArgumentException
KeyedObjectPool
instance to work where an ObjectPool
is needed using the specified key
when delegating. From source file:org.robotninjas.barge.rpc.netty.ProtoRpcRaftClientProvider.java
@Nonnull public RaftClient get(@Nonnull Replica replica) { checkNotNull(replica); return new ProtoRpcRaftClient(replica, PoolUtils.adapt(connectionPools, replica)); }
From source file:org.robotninjas.barge.rpc.ProtoRpcRaftClientProvider.java
@Nonnull public RaftClient get(@Nonnull Replica replica) { checkNotNull(replica); return new ProtoRpcRaftClient(PoolUtils.adapt(connectionPools, replica)); }