zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eolivelli <...@git.apache.org>
Subject [GitHub] zookeeper pull request #222: ZOOKEEPER-2697 Handle graceful stop of ZookKeep...
Date Wed, 26 Apr 2017 10:14:36 GMT
Github user eolivelli commented on a diff in the pull request:

    --- Diff: src/java/main/org/apache/zookeeper/ZooKeeper.java ---
    @@ -1325,6 +1325,23 @@ public synchronized void close() throws InterruptedException {
    +     * Close this client object as the {@link #close() } method.
    +     * This method will wait for internal resources to be released.
    +     *
    +     * @param waitForShutdownTimeoutMs timeout (in milliseconds) to wait for resources
to be released.
    +     * Use zero or a negative value to skip the wait
    +     * @throws InterruptedException
    +     * @return true if waitForShutdownTimeout is greater than zero and all of the resources
have been released
    +     */
    +    public boolean close(int waitForShutdownTimeoutMs) throws InterruptedException {
    +        close();
    +        if (waitForShutdownTimeoutMs > 0) {
    +            return testableWaitForShutdown(waitForShutdownTimeoutMs);
    --- End diff --
    @hanm I did not change the testableWaitForShutdown method in order not to break binary
compatibilty with existing subclasses.
    For instance in my projects I use that method in order to achieve the purpose of this
    If it is not a problem for other users I will change the signature

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.

View raw message