public class CouchbaseMemcachedConnection extends MemcachedConnection implements Reconfigurable
Modifier and Type | Field and Description |
---|---|
protected boolean |
reconfiguring |
addedQueue, failureMode, locator, metrics, metricType, nodesToShutdown, running, selector, shutDown
Constructor and Description |
---|
CouchbaseMemcachedConnection(int bufSize,
CouchbaseConnectionFactory f,
java.util.List<java.net.InetSocketAddress> a,
java.util.Collection<ConnectionObserver> obs,
FailureMode fm,
OperationFactory opfactory) |
Modifier and Type | Method and Description |
---|---|
protected void |
addOperation(java.lang.String key,
Operation o)
Add an operation to the given connection.
|
protected void |
handleWokenUpSelector()
Make sure that if the selector is woken up manually for an extended period
of time that the sockets are still alive.
|
protected void |
queueReconnect(MemcachedNode node)
Only queue for reconnect if the given node is still part of the cluster.
|
void |
reconfigure(Bucket bucket)
Call on a configuration update.
|
void |
run()
Infinitely loop processing IO.
|
addObserver, addOperation, addOperations, broadcastOperation, broadcastOperation, checkState, connectionsStatus, createConnections, enqueueOperation, getLocator, handleIO, insertOperation, opSucceeded, opTimedOut, registerMetrics, removeObserver, shutdown, toString
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield
public CouchbaseMemcachedConnection(int bufSize, CouchbaseConnectionFactory f, java.util.List<java.net.InetSocketAddress> a, java.util.Collection<ConnectionObserver> obs, FailureMode fm, OperationFactory opfactory) throws java.io.IOException
java.io.IOException
public void reconfigure(Bucket bucket)
Reconfigurable
reconfigure
in interface Reconfigurable
bucket
- updated vbucket configurationprotected void addOperation(java.lang.String key, Operation o)
MemcachedConnection
addOperation
in class MemcachedConnection
key
- the key the operation is operating upono
- the operationpublic void run()
run
in interface java.lang.Runnable
run
in class MemcachedConnection
protected void queueReconnect(MemcachedNode node)
queueReconnect
in class MemcachedConnection
node
- the node to check.protected void handleWokenUpSelector()
This is done by broadcasting a operation so that disconnected sockets are discovered even when no load is applied.
Copyright © 2006-2009 Dustin Sallings, 2009-2014 Couchbase, Inc.