|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.spy.memcached.compat.SpyObject
com.couchbase.client.ViewConnection
public class ViewConnection
The ViewConnection class creates and manages the various connections to the ViewNodes.
Field Summary | |
---|---|
protected boolean |
reconfiguring
|
protected boolean |
running
|
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class net.spy.memcached.compat.SpyObject |
---|
getLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected volatile boolean reconfiguring
protected volatile boolean running
Constructor Detail |
---|
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
Method Detail |
---|
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |