apache/curator — pull request #1 by dtrott (2014-03-06 01:48:58+00:00)
Title: Added CloseMode support to LeaderLatch

Added CloseMode support to LeaderLatch in order to be able to trigger the notLeader() callback when a Latch is manually closed.

The patch allows the close mode to be set either:
- During the creation of the latch so that the behavior is applied during a Closeable.close() call.
- Or on the close call to allow more specific control of notification behavior.

JIRA Issue to be added shortly.