Package net.spy.memcached
Class BinaryConnectionFactory
- java.lang.Object
-
- net.spy.memcached.compat.SpyObject
-
- net.spy.memcached.DefaultConnectionFactory
-
- 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_AUTH_WAIT_TIME, DEFAULT_FAILURE_MODE, DEFAULT_HASH, DEFAULT_MAX_RECONNECT_DELAY, DEFAULT_MAX_TIMEOUTEXCEPTION_THRESHOLD, DEFAULT_METRIC_TYPE, DEFAULT_OP_QUEUE_LEN, DEFAULT_OP_QUEUE_MAX_BLOCK_TIME, DEFAULT_OPERATION_TIMEOUT, DEFAULT_READ_BUFFER_SIZE, opQueueLen
-
-
Constructor Summary
Constructors Constructor Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MemcachedNode
createMemcachedNode(java.net.SocketAddress sa, java.nio.channels.SocketChannel c, int bufSize)
Create a new memcached node.protected java.lang.String
getName()
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, enableMetrics, getAuthDescriptor, getAuthWaitTime, getDefaultTranscoder, getFailureMode, getHashAlg, getInitialObservers, getListenerExecutorService, getMaxReconnectDelay, getMetricCollector, getOperationTimeout, getOpQueueLen, getOpQueueMaxBlockTime, getReadBufSize, getTimeoutExceptionThreshold, isDaemon, isDefaultExecutorService, shouldOptimize, toString, useNagleAlgorithm
-
-
-
-
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 sizehash
- the algorithm to use for hashing
-
-
Method Detail
-
createMemcachedNode
public MemcachedNode createMemcachedNode(java.net.SocketAddress sa, java.nio.channels.SocketChannel c, int bufSize)
Description copied from interface:ConnectionFactory
Create a new memcached node.- Specified by:
createMemcachedNode
in interfaceConnectionFactory
- Overrides:
createMemcachedNode
in classDefaultConnectionFactory
-
getOperationFactory
public OperationFactory getOperationFactory()
Description copied from interface:ConnectionFactory
Get the operation factory for connections built by this connection factory.- Specified by:
getOperationFactory
in interfaceConnectionFactory
- Overrides:
getOperationFactory
in classDefaultConnectionFactory
-
getName
protected java.lang.String getName()
- Overrides:
getName
in classDefaultConnectionFactory
-
-