|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.spy.memcached.compat.SpyObject
net.spy.memcached.DefaultConnectionFactory
net.spy.memcached.BinaryConnectionFactory
com.couchbase.client.CouchbaseConnectionFactory
public class CouchbaseConnectionFactory
Couchbase implementation of ConnectionFactory.
This implementation creates connections where the operation queue is an
ArrayBlockingQueue and the read and write queues are unbounded
LinkedBlockingQueues. The Retry
FailureMode and
KetamaHash
VBucket hashing mechanism are always used. If other
configurations are needed, look at the ConnectionFactoryBuilder.
Field Summary | |
---|---|
protected ConfigurationProvider |
configurationProvider
|
static net.spy.memcached.FailureMode |
DEFAULT_FAILURE_MODE
Default failure mode. |
static net.spy.memcached.HashAlgorithm |
DEFAULT_HASH
Default hash algorithm. |
static long |
DEFAULT_MIN_RECONNECT_INTERVAL
Specify a default minimum reconnect interval of 1.1s. |
static long |
DEFAULT_OBS_POLL_INTERVAL
Default Observe poll interval in ms. |
static int |
DEFAULT_OBS_POLL_MAX
Default maximum amount of poll cycles before failure. |
static int |
DEFAULT_OP_QUEUE_LEN
Maximum length of the operation queue returned by this connection factory. |
static int |
DEFAULT_VIEW_TIMEOUT
Default View request timeout in ms. |
Fields inherited from class net.spy.memcached.DefaultConnectionFactory |
---|
DEFAULT_MAX_RECONNECT_DELAY, DEFAULT_MAX_TIMEOUTEXCEPTION_THRESHOLD, DEFAULT_OP_QUEUE_MAX_BLOCK_TIME, DEFAULT_OPERATION_TIMEOUT, DEFAULT_READ_BUFFER_SIZE, opQueueLen |
Constructor Summary | |
---|---|
CouchbaseConnectionFactory(java.util.List<java.net.URI> baseList,
java.lang.String bucketName,
java.lang.String password)
|
Method Summary | |
---|---|
net.spy.memcached.MemcachedConnection |
createConnection(java.util.List<java.net.InetSocketAddress> addrs)
|
net.spy.memcached.NodeLocator |
createLocator(java.util.List<net.spy.memcached.MemcachedNode> nodes)
|
ViewConnection |
createViewConnection(java.util.List<java.net.InetSocketAddress> addrs)
|
ViewNode |
createViewNode(java.net.InetSocketAddress addr,
AsyncConnectionManager connMgr)
|
net.spy.memcached.auth.AuthDescriptor |
getAuthDescriptor()
|
java.lang.String |
getBucketName()
|
ClusterManager |
getClusterManager()
Returns a ClusterManager and initializes one if it does not exist. |
ConfigurationProvider |
getConfigurationProvider()
|
Config |
getVBucketConfig()
|
int |
getViewTimeout()
|
protected boolean |
pastReconnThreshold()
Checks if there have been more requests than allowed through maxConfigCheck in a 10 second period. |
protected void |
requestConfigReconnect(java.lang.String bucketName,
Reconfigurable rec)
|
boolean |
shouldOptimize()
|
Methods inherited from class net.spy.memcached.BinaryConnectionFactory |
---|
createMemcachedNode, getName, getOperationFactory |
Methods inherited from class net.spy.memcached.DefaultConnectionFactory |
---|
createOperationQueue, createReadOperationQueue, createWriteOperationQueue, getDefaultTranscoder, getFailureMode, getHashAlg, getInitialObservers, getMaxReconnectDelay, getOperationTimeout, getOpQueueLen, getOpQueueMaxBlockTime, getReadBufSize, getTimeoutExceptionThreshold, isDaemon, toString, 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, wait, wait, wait |
Field Detail |
---|
public static final net.spy.memcached.FailureMode DEFAULT_FAILURE_MODE
public static final net.spy.memcached.HashAlgorithm DEFAULT_HASH
public static final int DEFAULT_OP_QUEUE_LEN
public static final long DEFAULT_MIN_RECONNECT_INTERVAL
public static final int DEFAULT_VIEW_TIMEOUT
public static final long DEFAULT_OBS_POLL_INTERVAL
public static final int DEFAULT_OBS_POLL_MAX
protected volatile ConfigurationProvider configurationProvider
Constructor Detail |
---|
public CouchbaseConnectionFactory(java.util.List<java.net.URI> baseList, java.lang.String bucketName, java.lang.String password) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public ViewNode createViewNode(java.net.InetSocketAddress addr, AsyncConnectionManager connMgr)
public net.spy.memcached.MemcachedConnection createConnection(java.util.List<java.net.InetSocketAddress> addrs) throws java.io.IOException
createConnection
in interface net.spy.memcached.ConnectionFactory
createConnection
in class net.spy.memcached.DefaultConnectionFactory
java.io.IOException
public ViewConnection createViewConnection(java.util.List<java.net.InetSocketAddress> addrs) throws java.io.IOException
java.io.IOException
public net.spy.memcached.NodeLocator createLocator(java.util.List<net.spy.memcached.MemcachedNode> nodes)
createLocator
in interface net.spy.memcached.ConnectionFactory
createLocator
in class net.spy.memcached.DefaultConnectionFactory
public boolean shouldOptimize()
shouldOptimize
in interface net.spy.memcached.ConnectionFactory
shouldOptimize
in class net.spy.memcached.DefaultConnectionFactory
public net.spy.memcached.auth.AuthDescriptor getAuthDescriptor()
getAuthDescriptor
in interface net.spy.memcached.ConnectionFactory
getAuthDescriptor
in class net.spy.memcached.DefaultConnectionFactory
public java.lang.String getBucketName()
public int getViewTimeout()
public Config getVBucketConfig()
public ConfigurationProvider getConfigurationProvider()
protected void requestConfigReconnect(java.lang.String bucketName, Reconfigurable rec)
protected boolean pastReconnThreshold()
public ClusterManager getClusterManager()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |