net.spy.memcached
Class CouchbaseConnection

java.lang.Object
  extended by java.lang.Thread
      extended by net.spy.memcached.compat.SpyThread
          extended by net.spy.memcached.CouchbaseConnection
All Implemented Interfaces:
Runnable, Reconfigurable

public final class CouchbaseConnection
extends SpyThread
implements Reconfigurable


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
protected  boolean reconfiguring
           
protected  boolean running
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
CouchbaseConnection(CouchbaseConnectionFactory cf, List<InetSocketAddress> addrs, Collection<ConnectionObserver> obs)
           
 
Method Summary
 void addOp(HttpOperation op)
           
protected  void checkState()
           
 void handleIO()
           
 void reconfigure(Bucket bucket)
          Call on a configuration update
 void run()
           
 boolean shutdown()
           
 
Methods inherited from class net.spy.memcached.compat.SpyThread
getLogger
 
Methods inherited from class java.lang.Thread
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, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

reconfiguring

protected volatile boolean reconfiguring

running

protected volatile boolean running
Constructor Detail

CouchbaseConnection

public CouchbaseConnection(CouchbaseConnectionFactory cf,
                           List<InetSocketAddress> addrs,
                           Collection<ConnectionObserver> obs)
                    throws IOException
Throws:
IOException
Method Detail

addOp

public void addOp(HttpOperation op)

handleIO

public void handleIO()

checkState

protected void checkState()

shutdown

public boolean shutdown()
                 throws IOException
Throws:
IOException

reconfigure

public void reconfigure(Bucket bucket)
Description copied from interface: Reconfigurable
Call on a configuration update

Specified by:
reconfigure in interface Reconfigurable
Parameters:
bucket - updated vbucket configuration

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread