pool = new GenericKeyedObjectPool<>(new BaseKeyedPooledObjectFactory<InetSocketAddress, TNiftyClientChannelTransport>() {
@Override
public TNiftyClientChannelTransport create(InetSocketAddress key) throws Exception {
log.debug("Connecting to {}", key);
final FramedClientConnector connector = new FramedClientConnector(key, duplexProtocolFactory);
final TNiftyClientChannelTransport transport =
config.niftyClient.connectSync(
config.clientClass,
connector,
config.connectTimeout,
config.receiveTimeout,