Example usage for org.apache.commons.pool PoolUtils adapt

List of usage examples for org.apache.commons.pool PoolUtils adapt

Introduction

In this page you can find the example usage for org.apache.commons.pool PoolUtils adapt.

Prototype

public static ObjectPool adapt(final KeyedObjectPool keyedPool, final Object key)
        throws IllegalArgumentException 

Source Link

Document

Adapt a KeyedObjectPool instance to work where an ObjectPool is needed using the specified key when delegating.

Usage

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));
}