|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.curator.framework.state.ConnectionStateManager
public class ConnectionStateManager
Used internally to manage connection state
| Constructor Summary | |
|---|---|
ConnectionStateManager(CuratorFramework client,
ThreadFactory threadFactory)
|
|
| Method Summary | |
|---|---|
boolean |
addStateChange(ConnectionState newConnectionState)
Post a state change. |
boolean |
blockUntilConnected(int maxWaitTime,
TimeUnit units)
|
void |
close()
|
ListenerContainer<ConnectionStateListener> |
getListenable()
Return the listenable |
boolean |
isConnected()
|
boolean |
setToSuspended()
Change to ConnectionState.SUSPENDED only if not already suspended and not lost |
void |
start()
Start the manager |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConnectionStateManager(CuratorFramework client,
ThreadFactory threadFactory)
client - the clientthreadFactory - thread factory to use or null for a default| Method Detail |
|---|
public void start()
public void close()
close in interface Closeablepublic ListenerContainer<ConnectionStateListener> getListenable()
public boolean setToSuspended()
ConnectionState.SUSPENDED only if not already suspended and not lost
public boolean addStateChange(ConnectionState newConnectionState)
newConnectionState - new state
public boolean blockUntilConnected(int maxWaitTime,
TimeUnit units)
throws InterruptedException
InterruptedExceptionpublic boolean isConnected()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||