public class ConnectionFactory extends java.lang.Object implements org.apache.commons.pool2.PooledObjectFactory<Connection>
| Modifier and Type | Class and Description |
|---|---|
static class |
ConnectionFactory.Builder |
| Constructor and Description |
|---|
ConnectionFactory(ConnectionFactory.Builder builder) |
ConnectionFactory(HostAndPort hostAndPort) |
ConnectionFactory(HostAndPort hostAndPort,
JedisClientConfig clientConfig) |
ConnectionFactory(HostAndPort hostAndPort,
JedisClientConfig clientConfig,
Cache csCache) |
ConnectionFactory(JedisSocketFactory jedisSocketFactory,
JedisClientConfig clientConfig) |
| Modifier and Type | Method and Description |
|---|---|
void |
activateObject(org.apache.commons.pool2.PooledObject<Connection> pooledConnection) |
static ConnectionFactory.Builder |
builder() |
void |
destroyObject(org.apache.commons.pool2.PooledObject<Connection> pooledConnection) |
protected void |
initialize(Connection conn)
Initialize a freshly built
Connection. |
org.apache.commons.pool2.PooledObject<Connection> |
makeObject() |
void |
passivateObject(org.apache.commons.pool2.PooledObject<Connection> pooledConnection) |
boolean |
validateObject(org.apache.commons.pool2.PooledObject<Connection> pooledConnection) |
public ConnectionFactory(HostAndPort hostAndPort)
public ConnectionFactory(HostAndPort hostAndPort, JedisClientConfig clientConfig)
@Experimental public ConnectionFactory(HostAndPort hostAndPort, JedisClientConfig clientConfig, Cache csCache)
public ConnectionFactory(JedisSocketFactory jedisSocketFactory, JedisClientConfig clientConfig)
public ConnectionFactory(ConnectionFactory.Builder builder)
public static ConnectionFactory.Builder builder()
protected void initialize(Connection conn)
Connection.
Subclasses may override to wrap initialization (for example, with cancellation tracking),
but must ensure Connection.initializeFromClientConfig() is invoked exactly once.
public void activateObject(org.apache.commons.pool2.PooledObject<Connection> pooledConnection) throws java.lang.Exception
activateObject in interface org.apache.commons.pool2.PooledObjectFactory<Connection>java.lang.Exceptionpublic void destroyObject(org.apache.commons.pool2.PooledObject<Connection> pooledConnection) throws java.lang.Exception
destroyObject in interface org.apache.commons.pool2.PooledObjectFactory<Connection>java.lang.Exceptionpublic org.apache.commons.pool2.PooledObject<Connection> makeObject() throws java.lang.Exception
makeObject in interface org.apache.commons.pool2.PooledObjectFactory<Connection>java.lang.Exceptionpublic void passivateObject(org.apache.commons.pool2.PooledObject<Connection> pooledConnection) throws java.lang.Exception
passivateObject in interface org.apache.commons.pool2.PooledObjectFactory<Connection>java.lang.Exceptionpublic boolean validateObject(org.apache.commons.pool2.PooledObject<Connection> pooledConnection)
validateObject in interface org.apache.commons.pool2.PooledObjectFactory<Connection>Copyright © 2026. All rights reserved.