net.spy.memcached
Class KetamaConnectionFactory
java.lang.Object
  
net.spy.memcached.compat.SpyObject
      
net.spy.memcached.DefaultConnectionFactory
          
net.spy.memcached.KetamaConnectionFactory
- All Implemented Interfaces: 
 - ConnectionFactory
 
public class KetamaConnectionFactory
- extends DefaultConnectionFactory
 
ConnectionFactory instance that sets up a ketama compatible connection.
 
 This implementation piggy-backs on the functionality of the
 DefaultConnectionFactory in terms of connections and queue
 handling. Where it differs is that it uses both the 
 KetamaNodeLocator and the HashAlgorithm.KETAMA_HASH
 to provide consistent node hashing.
 
- See Also:
 - RJ's blog post
 
 
 
| 
Constructor Summary | 
KetamaConnectionFactory()
 
          Create a KetamaConnectionFactory with the default parameters. | 
KetamaConnectionFactory(int qLen,
                        int bufSize)
 
          Create a KetamaConnectionFactory with the given maximum operation
 queue length, and the given read buffer size. | 
 
 
| Methods inherited from class net.spy.memcached.DefaultConnectionFactory | 
createConnection, createMemcachedNode, createOperationQueue, createReadOperationQueue, createWriteOperationQueue, getDefaultTranscoder, getFailureMode, getHashAlg, getInitialObservers, getMaxReconnectDelay, getOperationFactory, getOperationTimeout, getOpQueueLen, getReadBufSize, isDaemon, shouldOptimize, useNagleAlgorithm | 
 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
KetamaConnectionFactory
public KetamaConnectionFactory(int qLen,
                               int bufSize)
- Create a KetamaConnectionFactory with the given maximum operation
 queue length, and the given read buffer size.
 
KetamaConnectionFactory
public KetamaConnectionFactory()
- Create a KetamaConnectionFactory with the default parameters.
 
createLocator
public NodeLocator createLocator(List<MemcachedNode> nodes)
- Description copied from interface: 
ConnectionFactory 
- Create a NodeLocator instance for the given list of nodes.
- Specified by:
 createLocator in interface ConnectionFactory- Overrides:
 createLocator in class DefaultConnectionFactory