public interface ConnectionFactory
Modifier and Type | Method and Description |
---|---|
MemcachedConnection |
createConnection(java.util.List<java.net.InetSocketAddress> addrs)
Create a MemcachedConnection for the given SocketAddresses.
|
NodeLocator |
createLocator(java.util.List<MemcachedNode> nodes)
Create a NodeLocator instance for the given list of nodes.
|
MemcachedNode |
createMemcachedNode(java.net.SocketAddress sa,
java.nio.channels.SocketChannel c,
int bufSize)
Create a new memcached node.
|
java.util.concurrent.BlockingQueue<Operation> |
createOperationQueue()
Create a BlockingQueue for operations for a connection.
|
java.util.concurrent.BlockingQueue<Operation> |
createReadOperationQueue()
Create a BlockingQueue for the operations currently expecting to read
responses from memcached.
|
java.util.concurrent.BlockingQueue<Operation> |
createWriteOperationQueue()
Create a BlockingQueue for the operations currently expecting to write
requests to memcached.
|
MetricType |
enableMetrics()
If true, metric collections are enabled.
|
AuthDescriptor |
getAuthDescriptor()
Authenticate connections using the given auth descriptor.
|
long |
getAuthWaitTime()
The time to wait until authentication completes when an operation is
inserted.
|
Transcoder<java.lang.Object> |
getDefaultTranscoder()
Get the default transcoder to be used in connections created by this
factory.
|
FailureMode |
getFailureMode()
Get the default failure mode for the underlying connection.
|
HashAlgorithm |
getHashAlg()
Get the hash algorithm to be used.
|
java.util.Collection<ConnectionObserver> |
getInitialObservers()
Observers that should be established at the time of connection
instantiation.
|
java.util.concurrent.ExecutorService |
getListenerExecutorService()
Get the ExecutorService which is used to asynchronously execute listeners
on futures.
|
long |
getMaxReconnectDelay()
Maximum number of milliseconds to wait between reconnect attempts.
|
MetricCollector |
getMetricCollector()
The currently active
MetricCollector . |
OperationFactory |
getOperationFactory()
Get the operation factory for connections built by this connection factory.
|
long |
getOperationTimeout()
Get the operation timeout used by this connection.
|
long |
getOpQueueMaxBlockTime()
Get the maximum amount of time (in milliseconds) a client is willing to
wait to add a new item to a queue.
|
int |
getReadBufSize() |
int |
getTimeoutExceptionThreshold()
Maximum number of timeout exception for shutdown connection.
|
boolean |
isDaemon()
If true, the IO thread should be a daemon thread.
|
boolean |
isDefaultExecutorService()
Returns true if the default provided
ExecutorService has not been
overriden through the builder. |
boolean |
shouldOptimize()
If true, low-level optimization is in effect.
|
boolean |
useNagleAlgorithm()
If true, the nagle algorithm will be used on connected sockets.
|
MemcachedConnection createConnection(java.util.List<java.net.InetSocketAddress> addrs) throws java.io.IOException
addrs
- the addresses of the memcached serversjava.io.IOException
- for problems initializing the memcached connectionsMemcachedNode createMemcachedNode(java.net.SocketAddress sa, java.nio.channels.SocketChannel c, int bufSize)
java.util.concurrent.BlockingQueue<Operation> createOperationQueue()
java.util.concurrent.BlockingQueue<Operation> createReadOperationQueue()
java.util.concurrent.BlockingQueue<Operation> createWriteOperationQueue()
long getOpQueueMaxBlockTime()
java.util.concurrent.ExecutorService getListenerExecutorService()
boolean isDefaultExecutorService()
ExecutorService
has not been
overriden through the builder.NodeLocator createLocator(java.util.List<MemcachedNode> nodes)
OperationFactory getOperationFactory()
long getOperationTimeout()
boolean isDaemon()
boolean useNagleAlgorithm()
See Socket.setTcpNoDelay(boolean)
for more information.
java.util.Collection<ConnectionObserver> getInitialObservers()
FailureMode getFailureMode()
Transcoder<java.lang.Object> getDefaultTranscoder()
boolean shouldOptimize()
int getReadBufSize()
HashAlgorithm getHashAlg()
long getMaxReconnectDelay()
AuthDescriptor getAuthDescriptor()
int getTimeoutExceptionThreshold()
MetricType enableMetrics()
MetricCollector getMetricCollector()
MetricCollector
.long getAuthWaitTime()
Copyright © 2006-2009 Dustin Sallings, 2009-2013 Couchbase, Inc.