|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
com.couchbase.client.vbucket.BucketMonitor
public class BucketMonitor
The BucketMonitor will open an HTTP comet stream to monitor for changes to the list of nodes. If the list of nodes changes, it will notify observers.
Field Summary | |
---|---|
static java.lang.String |
CLIENT_SPEC_VER
The specification version which this client meets. |
Constructor Summary | |
---|---|
BucketMonitor(java.net.URI cometStreamURI,
java.lang.String bucketname,
java.lang.String username,
java.lang.String password,
ConfigurationParser configParser)
|
Method Summary | |
---|---|
protected void |
createChannel()
|
java.lang.String |
getHttpPass()
|
java.lang.String |
getHttpUser()
|
protected void |
notifyDisconnected()
Take any action required when the monitor appears to be disconnected. |
protected org.jboss.netty.handler.codec.http.HttpRequest |
prepareRequest(java.net.URI uri,
java.lang.String h)
|
protected void |
replaceConfig()
Replace the previously received configuration with the current one. |
void |
setConfigParser(ConfigurationParser newConfigParser)
|
void |
shutdown()
Shut down the monitor in a graceful way (and release all resources). |
void |
shutdown(long timeout,
java.util.concurrent.TimeUnit unit)
Shut down this monitor in a graceful way. |
void |
startMonitor()
|
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLIENT_SPEC_VER
Constructor Detail |
---|
public BucketMonitor(java.net.URI cometStreamURI, java.lang.String bucketname, java.lang.String username, java.lang.String password, ConfigurationParser configParser)
cometStreamURI
- the URI which will stream node changesbucketname
- the bucketToMonitor name we are monitoringusername
- the username required for HTTP Basic Auth to the restful
servicepassword
- the password required for HTTP Basic Auth to the restful
serviceMethod Detail |
---|
protected void notifyDisconnected()
public void startMonitor()
protected void createChannel()
protected org.jboss.netty.handler.codec.http.HttpRequest prepareRequest(java.net.URI uri, java.lang.String h)
public java.lang.String getHttpUser()
public java.lang.String getHttpPass()
public void shutdown()
public void shutdown(long timeout, java.util.concurrent.TimeUnit unit)
timeout
- unit
- protected void replaceConfig()
public void setConfigParser(ConfigurationParser newConfigParser)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |