public class ViewConnection extends net.spy.memcached.compat.SpyObject implements Reconfigurable
Modifier and Type | Field and Description |
---|---|
protected boolean |
reconfiguring |
protected boolean |
running |
Constructor and Description |
---|
ViewConnection(CouchbaseConnectionFactory cf,
java.util.List<java.net.InetSocketAddress> addrs,
java.util.Collection<net.spy.memcached.ConnectionObserver> obs)
Kickstarts the initialization and delegates the connection creation.
|
Modifier and Type | Method and Description |
---|---|
void |
addOp(HttpOperation op)
Write an operation to the next ViewNode.
|
protected void |
checkState()
Checks the state of the ViewConnection.
|
java.util.List<ViewNode> |
getConnectedNodes()
Returns the currently connected ViewNodes.
|
void |
reconfigure(Bucket bucket)
Reconfigures the connected ViewNodes.
|
boolean |
shutdown()
Initiates the shutdown of all connected ViewNodes.
|
protected volatile boolean reconfiguring
protected volatile boolean running
public ViewConnection(CouchbaseConnectionFactory cf, java.util.List<java.net.InetSocketAddress> addrs, java.util.Collection<net.spy.memcached.ConnectionObserver> obs) throws java.io.IOException
cf
- the factory which contains neeeded information.addrs
- the list of addresses to connect to.obs
- the connection observers.java.io.IOException
public void addOp(HttpOperation op)
op
- the operation to run.public java.util.List<ViewNode> getConnectedNodes()
protected void checkState()
public boolean shutdown() throws java.io.IOException
java.io.IOException
public void reconfigure(Bucket bucket)
reconfigure
in interface Reconfigurable
bucket
- the bucket which has been rebalanced.Copyright © 2006-2009 Dustin Sallings, 2009-2012 Couchbase, Inc.