Inherited by BinaryConnectionFactory, and KetamaConnectionFactory.

Public Member Functions | |
| MemcachedConnection | createConnection (List< InetSocketAddress > addrs) throws IOException |
| NodeLocator | createLocator (List< MemcachedNode > nodes) |
| MemcachedNode | createMemcachedNode (SocketAddress sa, SocketChannel c, int bufSize) |
| BlockingQueue< Operation > | createOperationQueue () |
| BlockingQueue< Operation > | createReadOperationQueue () |
| BlockingQueue< Operation > | createWriteOperationQueue () |
| DefaultConnectionFactory () | |
| DefaultConnectionFactory (int qLen, int bufSize) | |
| DefaultConnectionFactory (int qLen, int bufSize, HashAlgorithm hash) | |
| HashAlgorithm | getHashAlg () |
| OperationFactory | getOperationFactory () |
| long | getOperationTimeout () |
| int | getOpQueueLen () |
| int | getReadBufSize () |
| boolean | isDaemon () |
Static Public Attributes | |
| static final int | DEFAULT_OP_QUEUE_LEN = 16384 |
| static final long | DEFAULT_OPERATION_TIMEOUT = 1000 |
| static final int | DEFAULT_READ_BUFFER_SIZE = 16384 |
Private Attributes | |
| final HashAlgorithm | hashAlg |
| final int | opQueueLen |
| final int | readBufSize |
This implementation creates connections where each server worker queue is implemented using an ArrayBlockingQueue. The read queue is automatically configured to be 10% larger than the specified op queue. The write queue is and input queues are the same size.
| DefaultConnectionFactory | ( | int | qLen, | |
| int | bufSize, | |||
| HashAlgorithm | hash | |||
| ) |
Construct a DefaultConnectionFactory with the given parameters.
| hashAlgorithm | the algorithm to use for hashing | |
| bufSize | the buffer size | |
| qLen | the queue length. |
| DefaultConnectionFactory | ( | int | qLen, | |
| int | bufSize | |||
| ) |
Create a DefaultConnectionFactory with the given maximum operation queue length, and the given read buffer size.
Create a DefaultConnectionFactory with the default parameters.
| MemcachedConnection createConnection | ( | List< InetSocketAddress > | addrs | ) | throws IOException |
Create a MemcachedConnection for the given SocketAddresses.
| addrs | the addresses of the memcached servers |
| IOException | for problems initializing the memcached connections |
Implements ConnectionFactory.
| NodeLocator createLocator | ( | List< MemcachedNode > | nodes | ) |
Create a NodeLocator instance for the given list of nodes.
Implements ConnectionFactory.
Reimplemented in KetamaConnectionFactory.
| MemcachedNode createMemcachedNode | ( | SocketAddress | sa, | |
| SocketChannel | c, | |||
| int | bufSize | |||
| ) |
Create a new memcached node.
Implements ConnectionFactory.
Reimplemented in BinaryConnectionFactory.
| BlockingQueue<Operation> createOperationQueue | ( | ) |
Create a BlockingQueue for operations for a connection.
Implements ConnectionFactory.
| BlockingQueue<Operation> createReadOperationQueue | ( | ) |
Create a BlockingQueue for the operations currently expecting to read responses from memcached.
Implements ConnectionFactory.
| BlockingQueue<Operation> createWriteOperationQueue | ( | ) |
Create a BlockingQueue for the operations currently expecting to write requests to memcached.
Implements ConnectionFactory.
| HashAlgorithm getHashAlg | ( | ) |
Get the hash algorithm set at construct time.
| OperationFactory getOperationFactory | ( | ) |
Get the operation factory for connections built by this connection factory.
Implements ConnectionFactory.
Reimplemented in BinaryConnectionFactory.
| long getOperationTimeout | ( | ) |
Get the operation timeout used by this connection.
Implements ConnectionFactory.
| int getOpQueueLen | ( | ) |
Get the op queue length set at construct time.
| int getReadBufSize | ( | ) |
Get the read buffer size set at construct time.
| boolean isDaemon | ( | ) |
If true, the IO thread should be a daemon thread.
Implements ConnectionFactory.
final int DEFAULT_OP_QUEUE_LEN = 16384 [static] |
Maximum length of the operation queue returned by this connection factory.
final long DEFAULT_OPERATION_TIMEOUT = 1000 [static] |
Default operation timeout in milliseconds.
final int DEFAULT_READ_BUFFER_SIZE = 16384 [static] |
The read buffer size for each server connection from this factory.
final HashAlgorithm hashAlg [private] |
final int opQueueLen [private] |
final int readBufSize [private] |
1.5.8