|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.data.redis.connection.jredis.JredisPool
public class JredisPool
JRedis implementation of Pool
Constructor Summary | |
---|---|
JredisPool(org.jredis.connector.ConnectionSpec connectionSpec)
Uses the GenericObjectPool.Config defaults for configuring the connection pool |
|
JredisPool(org.jredis.connector.ConnectionSpec connectionSpec,
org.apache.commons.pool.impl.GenericObjectPool.Config poolConfig)
|
|
JredisPool(String hostName,
int port)
Uses the GenericObjectPool.Config and ConnectionSpec defaults for configuring the connection pool |
|
JredisPool(String hostName,
int port,
org.apache.commons.pool.impl.GenericObjectPool.Config poolConfig)
Uses the ConnectionSpec defaults for configuring the connection pool |
|
JredisPool(String hostName,
int port,
int dbIndex,
String password,
int timeout)
Uses the GenericObjectPool.Config defaults for configuring the connection pool |
|
JredisPool(String hostName,
int port,
int dbIndex,
String password,
int timeout,
org.apache.commons.pool.impl.GenericObjectPool.Config poolConfig)
|
Method Summary | |
---|---|
void |
destroy()
Destroys the pool |
org.jredis.JRedis |
getResource()
|
void |
returnBrokenResource(org.jredis.JRedis resource)
|
void |
returnResource(org.jredis.JRedis resource)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JredisPool(String hostName, int port)
GenericObjectPool.Config
and ConnectionSpec
defaults for configuring the connection pool
hostName
- The Redis hostport
- The Redis portpublic JredisPool(String hostName, int port, org.apache.commons.pool.impl.GenericObjectPool.Config poolConfig)
ConnectionSpec
defaults for configuring the connection pool
hostName
- The Redis hostport
- The Redis portpoolConfig
- The pool GenericObjectPool.Config
public JredisPool(org.jredis.connector.ConnectionSpec connectionSpec)
GenericObjectPool.Config
defaults for configuring the connection pool
connectionSpec
- The ConnectionSpec
for connecting to Redispublic JredisPool(org.jredis.connector.ConnectionSpec connectionSpec, org.apache.commons.pool.impl.GenericObjectPool.Config poolConfig)
connectionSpec
- The ConnectionSpec
for connecting to RedispoolConfig
- The pool GenericObjectPool.Config
public JredisPool(String hostName, int port, int dbIndex, String password, int timeout)
GenericObjectPool.Config
defaults for configuring the connection pool
hostName
- 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.pool.impl.GenericObjectPool.Config 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 GenericObjectPool.Config
Method Detail |
---|
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 poolpublic void destroy()
Pool
destroy
in interface Pool<org.jredis.JRedis>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |