public class ConnectionPoolFactory extends org.apache.commons.pool2.BaseKeyedPooledObjectFactory<ServerAddress,Connection>
| Constructor and Description |
|---|
ConnectionPoolFactory(NSQConfig config) |
| Modifier and Type | Method and Description |
|---|---|
Connection |
create(ServerAddress serverAddress) |
void |
destroyObject(ServerAddress key,
org.apache.commons.pool2.PooledObject<Connection> p) |
boolean |
validateObject(ServerAddress key,
org.apache.commons.pool2.PooledObject<Connection> p) |
org.apache.commons.pool2.PooledObject<Connection> |
wrap(Connection con) |
public ConnectionPoolFactory(NSQConfig config)
public Connection create(ServerAddress serverAddress) throws Exception
create in class org.apache.commons.pool2.BaseKeyedPooledObjectFactory<ServerAddress,Connection>Exceptionpublic org.apache.commons.pool2.PooledObject<Connection> wrap(Connection con)
wrap in class org.apache.commons.pool2.BaseKeyedPooledObjectFactory<ServerAddress,Connection>public boolean validateObject(ServerAddress key, org.apache.commons.pool2.PooledObject<Connection> p)
validateObject in interface org.apache.commons.pool2.KeyedPooledObjectFactory<ServerAddress,Connection>validateObject in class org.apache.commons.pool2.BaseKeyedPooledObjectFactory<ServerAddress,Connection>public void destroyObject(ServerAddress key, org.apache.commons.pool2.PooledObject<Connection> p) throws Exception
destroyObject in interface org.apache.commons.pool2.KeyedPooledObjectFactory<ServerAddress,Connection>destroyObject in class org.apache.commons.pool2.BaseKeyedPooledObjectFactory<ServerAddress,Connection>ExceptionCopyright © 2017. All rights reserved.