curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randgalt <...@git.apache.org>
Subject [GitHub] curator pull request: Curator 110
Date Thu, 12 Jun 2014 12:57:11 GMT
Github user Randgalt commented on a diff in the pull request:

    https://github.com/apache/curator/pull/9#discussion_r13699515
  
    --- Diff: curator-framework/src/main/java/org/apache/curator/framework/CuratorFramework.java
---
    @@ -210,4 +213,28 @@
          * @param watcher the watcher
          */
         public void clearWatcherReferences(Watcher watcher);
    +    
    +    /**
    +     * Get the current connection state. The connection state will have a value of 0
until
    +     * the first connection related event is received.
    +     * @return The current connection state, or null if it is unknown 
    +     */
    +    public ConnectionState getCurrentConnectionState();
    +    
    +    /**
    +     * Block until a connection to ZooKeeper is available or the maxWaitTime has been
exceeded
    +     * @param maxWaitTime The maximum wait time. Specify a value <= 0 to wait indefinitely
    +     * @param units The time units for the maximum wait time.
    +     * @return True if connection has been established, false otherwise.
    +     * @throws InterruptedException If interrupted while waiting
    +     */
    +    public boolean blockUntilConnected(int maxWaitTime, TimeUnit units) throws InterruptedException;
    +    
    +    /**
    +     * Block until a connection to ZooKeeper is available. This method will not return
until a
    +     * connection is available or it is interrupted, in which case an InterruptedException
will
    +     * be thrown
    +     * @throws InterruptedException If interrupted while waiting
    +     */
    +    public void blockUntilConnected() throws InterruptedException;
    --- End diff --
    
    Why are these needed? They already exist in the CuratorZookeeperClient.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message