zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-2697) Handle graceful stop of ZookKeeper client
Date Tue, 11 Apr 2017 16:05:41 GMT

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-2697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15964573#comment-15964573
] 

ASF GitHub Bot commented on ZOOKEEPER-2697:
-------------------------------------------

Github user Randgalt commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/222#discussion_r110944401
  
    --- 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 waitForShutdownTimeout 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 waitForShutdownTimeout) throws InterruptedException {
    --- End diff --
    
    pet peeve - timing argument names that don't imply the unit. Can you name this `waitForShutdownTimeoutMs`?


> Handle graceful stop of ZookKeeper client
> -----------------------------------------
>
>                 Key: ZOOKEEPER-2697
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2697
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: java client
>    Affects Versions: 3.4.9
>            Reporter: Enrico Olivelli
>            Priority: Critical
>
> As seen in ZOOKEEPER-1394 I would like to have the "close"  which waits for all background
activities to  finish.
> In tests the method "testableWaitForShutdown" is used.
> We can add a new ZooKeeper.close(int tineout)  method which will act as testableWaitForShutdown,
joining all support threads.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message