CURATOR-110 - Modified state handling to treat 'CONNECTED' and
'RECONNECTED' events in the same way. Added a test case for the leader
latch being started before a connection to ZK has been established.
CURATOR-110 - Fixed up formatting to Curator standards
CURATOR-110 - Modified the enum to have an abstract isConnected() method
that can be overridden by each enum instance.
some edits on the rpc web doc
give credit to Facebook Swift
some doc edits
added desc for rpc
CURATOR-110 - Modified the CuratorFramework to expose a 'blockUntilConnected' method. This allows a race condition between the start() method and the ConnectionStateListener in the LeaderLatch recipe to be avoided. Updated the leader latch start() method to block until a connection is available (in a background thread), before it attempts to setup its state. This means that it will work correctly if started before a connection to ZK is available.
CURATOR-110 - Moved the 'wait until connection established' logic into
the ExecuteAfterConnectionEstablished utility class. Cleaned up the
blockUntilConnected() logic in the CuratorFrameworkImpl
CURATOR-110 - Fixed up the connection notifications so that they will
only notify blocked clients when a connected state is reached, rather
than any state.
1. Added license. 2. ExecuteAfterConnectionEstablished should use a Callable and allow the exception to bubble up
Utility to get a name for the thread
Moved the connection blocking code into ConnectionManager. It's cleaner and doesn't require a connection state listener
Now that start() uses AfterConnectionEstablished, no longer correct/needed to handle CONNECTED in state change
CURATOR-114 - Modified the TestingServer to expose the restart() method
on the underlying TestingZooKeeperServer. Modified all unit tests that
were previously using the stop() and then recreate using existing
temporary directory and port approach for restarting the server, so that
they now just call the restart() method.
AfterConnectionEstablished needs to return the future from the service so that clients can cancel the action if needed. Added this to LeaderLatch
minor refactor
Added testProperCloseWithoutConnectionEstablished
CURATOR-114 - Modified the restart() method so that it will restart the
server from any state other than CLOSED (because this server has had all
of its state cleared).
Merge branch 'CURATOR-110'