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
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
ConstructorsConstructorDescriptionCreate 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
Modifier and TypeMethodDescriptioncreateMemcachedNode
(SocketAddress sa, SocketChannel c, int bufSize) Create a new memcached node.protected String
getName()
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 Details
-
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
Construct a BinaryConnectionFactory with the given parameters.- Parameters:
len
- the queue length.bufSize
- the buffer sizehash
- the algorithm to use for hashing
-
-
Method Details
-
createMemcachedNode
Description copied from interface:ConnectionFactory
Create a new memcached node.- Specified by:
createMemcachedNode
in interfaceConnectionFactory
- Overrides:
createMemcachedNode
in classDefaultConnectionFactory
-
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
- Overrides:
getName
in classDefaultConnectionFactory
-