Package redis.clients.jedis
Class ConnectionFactory
java.lang.Object
redis.clients.jedis.ConnectionFactory
- All Implemented Interfaces:
org.apache.commons.pool2.PooledObjectFactory<Connection>
public class ConnectionFactory
extends Object
implements org.apache.commons.pool2.PooledObjectFactory<Connection>
PoolableObjectFactory custom impl.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final JedisClientConfigprivate final JedisSocketFactoryprivate static final org.slf4j.Logger -
Constructor Summary
ConstructorsConstructorDescriptionConnectionFactory(HostAndPort hostAndPort) ConnectionFactory(HostAndPort hostAndPort, JedisClientConfig clientConfig) ConnectionFactory(JedisSocketFactory jedisSocketFactory, JedisClientConfig clientConfig) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivateObject(org.apache.commons.pool2.PooledObject<Connection> pooledConnection) voiddestroyObject(org.apache.commons.pool2.PooledObject<Connection> pooledConnection) org.apache.commons.pool2.PooledObject<Connection> voidpassivateObject(org.apache.commons.pool2.PooledObject<Connection> pooledConnection) voidsetPassword(String password) Deprecated.booleanvalidateObject(org.apache.commons.pool2.PooledObject<Connection> pooledConnection) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.commons.pool2.PooledObjectFactory
destroyObject
-
Field Details
-
logger
private static final org.slf4j.Logger logger -
jedisSocketFactory
-
clientConfig
-
-
Constructor Details
-
ConnectionFactory
-
ConnectionFactory
-
ConnectionFactory
-
-
Method Details
-
setPassword
Deprecated. -
activateObject
public void activateObject(org.apache.commons.pool2.PooledObject<Connection> pooledConnection) throws Exception - Specified by:
activateObjectin interfaceorg.apache.commons.pool2.PooledObjectFactory<Connection>- Throws:
Exception
-
destroyObject
public void destroyObject(org.apache.commons.pool2.PooledObject<Connection> pooledConnection) throws Exception - Specified by:
destroyObjectin interfaceorg.apache.commons.pool2.PooledObjectFactory<Connection>- Throws:
Exception
-
makeObject
- Specified by:
makeObjectin interfaceorg.apache.commons.pool2.PooledObjectFactory<Connection>- Throws:
Exception
-
passivateObject
public void passivateObject(org.apache.commons.pool2.PooledObject<Connection> pooledConnection) throws Exception - Specified by:
passivateObjectin interfaceorg.apache.commons.pool2.PooledObjectFactory<Connection>- Throws:
Exception
-
validateObject
- Specified by:
validateObjectin interfaceorg.apache.commons.pool2.PooledObjectFactory<Connection>
-
RedisCredentialsProviderthroughJedisClientConfig.getCredentialsProvider().