@Deprecated public class JredisPool extends Object implements Pool<org.jredis.JRedis>
Pool
Constructor and Description |
---|
JredisPool(org.jredis.connector.ConnectionSpec connectionSpec)
Deprecated.
Uses the
Config defaults for configuring the connection pool |
JredisPool(org.jredis.connector.ConnectionSpec connectionSpec,
org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig)
Deprecated.
|
JredisPool(String hostName,
int port)
Deprecated.
Uses the
Config and ConnectionSpec defaults for configuring the connection pool |
JredisPool(String hostName,
int port,
org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig)
Deprecated.
Uses the
ConnectionSpec defaults for configuring the connection pool |
JredisPool(String hostName,
int port,
int dbIndex,
String password,
int timeout)
Deprecated.
Uses the
Config defaults for configuring the connection pool |
JredisPool(String hostName,
int port,
int dbIndex,
String password,
int timeout,
org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Deprecated.
Destroys the pool
|
org.jredis.JRedis |
getResource()
Deprecated.
|
void |
returnBrokenResource(org.jredis.JRedis resource)
Deprecated.
|
void |
returnResource(org.jredis.JRedis resource)
Deprecated.
|
public JredisPool(String hostName, int port)
Config
and ConnectionSpec
defaults for configuring the connection poolhostName
- The Redis hostport
- The Redis portpublic JredisPool(String hostName, int port, org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig)
ConnectionSpec
defaults for configuring the connection poolhostName
- The Redis hostport
- The Redis portpoolConfig
- The pool Config
public JredisPool(org.jredis.connector.ConnectionSpec connectionSpec)
Config
defaults for configuring the connection poolconnectionSpec
- The ConnectionSpec
for connecting to Redispublic JredisPool(org.jredis.connector.ConnectionSpec connectionSpec, org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig)
connectionSpec
- The ConnectionSpec
for connecting to RedispoolConfig
- The pool Config
public JredisPool(String hostName, int port, int dbIndex, String password, int timeout)
Config
defaults for configuring the connection poolhostName
- The Redis hostport
- The Redis portdbIndex
- The index of the database all connections should use. The database will only be selected on initial
creation of the pooled JRedis
instances. Since calling select directly on JRedis
is not
supported, it is assumed that connections can be re-used without subsequent selects.password
- The password used for authenticating with the Redis server or null if no password requiredtimeout
- The socket timeout or 0 to use the default socket timeoutpublic JredisPool(String hostName, int port, int dbIndex, String password, int timeout, org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig)
hostName
- The Redis hostport
- The Redis portdbIndex
- The index of the database all connections should usepassword
- The password used for authenticating with the Redis server or null if no password requiredtimeout
- The socket timeout or 0 to use the default socket timeoutpoolConfig
- The pool Config
public org.jredis.JRedis getResource()
getResource
in interface Pool<org.jredis.JRedis>
public void returnBrokenResource(org.jredis.JRedis resource)
returnBrokenResource
in interface Pool<org.jredis.JRedis>
resource
- A broken resource that should be invalidatedpublic void returnResource(org.jredis.JRedis resource)
returnResource
in interface Pool<org.jredis.JRedis>
resource
- A resource to return to the poolCopyright © 2011-2015–2017 Pivotal Software, Inc.. All rights reserved.