redis.clients.jedis
Class ShardedJedisPool

java.lang.Object
  extended by redis.clients.util.FixedResourcePool<ShardedJedis>
      extended by redis.clients.jedis.ShardedJedisPool

public class ShardedJedisPool
extends FixedResourcePool<ShardedJedis>


Nested Class Summary
 
Nested classes/interfaces inherited from class redis.clients.util.FixedResourcePool
FixedResourcePool.Metrics, FixedResourcePool.RepairThread
 
Constructor Summary
ShardedJedisPool(java.util.List<JedisShardInfo> shards)
           
ShardedJedisPool(java.util.List<JedisShardInfo> shards, Hashing algo)
           
ShardedJedisPool(java.util.List<JedisShardInfo> shards, Hashing algo, java.util.regex.Pattern keyTagPattern)
           
ShardedJedisPool(java.util.List<JedisShardInfo> shards, java.util.regex.Pattern keyTagPattern)
           
 
Method Summary
protected  ShardedJedis createResource()
          Create a resource for the pool.
protected  void destroyResource(ShardedJedis jedis)
          Destroy a resource.
protected  boolean isResourceValid(ShardedJedis jedis)
          Check if the resource is still valid.
 
Methods inherited from class redis.clients.util.FixedResourcePool
checkInit, destroy, getDefaultPoolWait, getDestructionWait, getName, getRepairThreadsNumber, getResource, getResource, getResourcesNumber, getTimeBetweenValidation, init, returnBrokenResource, returnResource, setDefaultPoolWait, setDestructionWait, setName, setRepairThreadsNumber, setResourcesNumber, setTimeBetweenValidation, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ShardedJedisPool

public ShardedJedisPool(java.util.List<JedisShardInfo> shards)

ShardedJedisPool

public ShardedJedisPool(java.util.List<JedisShardInfo> shards,
                        Hashing algo)

ShardedJedisPool

public ShardedJedisPool(java.util.List<JedisShardInfo> shards,
                        java.util.regex.Pattern keyTagPattern)

ShardedJedisPool

public ShardedJedisPool(java.util.List<JedisShardInfo> shards,
                        Hashing algo,
                        java.util.regex.Pattern keyTagPattern)
Method Detail

createResource

protected ShardedJedis createResource()
Description copied from class: FixedResourcePool
Create a resource for the pool. This method is always called from the REPAIR threads. If it's impossible to create the resource, this method should wait or hold until resource creation becomes possible.

Specified by:
createResource in class FixedResourcePool<ShardedJedis>

destroyResource

protected void destroyResource(ShardedJedis jedis)
Description copied from class: FixedResourcePool
Destroy a resource.

Specified by:
destroyResource in class FixedResourcePool<ShardedJedis>

isResourceValid

protected boolean isResourceValid(ShardedJedis jedis)
Description copied from class: FixedResourcePool
Check if the resource is still valid.

Specified by:
isResourceValid in class FixedResourcePool<ShardedJedis>
Returns:


Copyright © 2010. All Rights Reserved.