net.spy.memcached
Class BinaryConnectionFactory

java.lang.Object
  extended by net.spy.memcached.compat.SpyObject
      extended by net.spy.memcached.DefaultConnectionFactory
          extended by net.spy.memcached.BinaryConnectionFactory
All Implemented Interfaces:
ConnectionFactory

public class BinaryConnectionFactory
extends DefaultConnectionFactory

Default connection factory for binary wire protocol connections.


Field Summary
 
Fields inherited from class net.spy.memcached.DefaultConnectionFactory
DEFAULT_FAILURE_MODE, DEFAULT_HASH, DEFAULT_MAX_RECONNECT_DELAY, DEFAULT_OP_QUEUE_LEN, DEFAULT_OPERATION_TIMEOUT, DEFAULT_READ_BUFFER_SIZE
 
Constructor Summary
BinaryConnectionFactory()
          Create a DefaultConnectionFactory with the default parameters.
BinaryConnectionFactory(int len, int bufSize)
          Create a BinaryConnectionFactory with the given maximum operation queue length, and the given read buffer size.
BinaryConnectionFactory(int len, int bufSize, HashAlgorithm hash)
          Construct a BinaryConnectionFactory with the given parameters.
 
Method Summary
 MemcachedNode createMemcachedNode(SocketAddress sa, SocketChannel c, int bufSize)
          Create a new memcached node.
 OperationFactory getOperationFactory()
          Get the operation factory for connections built by this connection factory.
 
Methods inherited from class net.spy.memcached.DefaultConnectionFactory
createConnection, createLocator, createOperationQueue, createReadOperationQueue, createWriteOperationQueue, getDefaultTranscoder, getFailureMode, getHashAlg, getInitialObservers, getMaxReconnectDelay, getOperationTimeout, getOpQueueLen, getReadBufSize, isDaemon, shouldOptimize, useNagleAlgorithm
 
Methods inherited from class net.spy.memcached.compat.SpyObject
getLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryConnectionFactory

public BinaryConnectionFactory()
Create a DefaultConnectionFactory with the default parameters.


BinaryConnectionFactory

public BinaryConnectionFactory(int len,
                               int bufSize)
Create a BinaryConnectionFactory with the given maximum operation queue length, and the given read buffer size.


BinaryConnectionFactory

public BinaryConnectionFactory(int len,
                               int bufSize,
                               HashAlgorithm hash)
Construct a BinaryConnectionFactory with the given parameters.

Parameters:
len - the queue length.
bufSize - the buffer size
hash - the algorithm to use for hashing
Method Detail

createMemcachedNode

public MemcachedNode createMemcachedNode(SocketAddress sa,
                                         SocketChannel c,
                                         int bufSize)
Description copied from interface: ConnectionFactory
Create a new memcached node.

Specified by:
createMemcachedNode in interface ConnectionFactory
Overrides:
createMemcachedNode in class DefaultConnectionFactory

getOperationFactory

public OperationFactory getOperationFactory()
Description copied from interface: ConnectionFactory
Get the operation factory for connections built by this connection factory.

Specified by:
getOperationFactory in interface ConnectionFactory
Overrides:
getOperationFactory in class DefaultConnectionFactory