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

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

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

    https://github.com/apache/zookeeper/pull/222#discussion_r113902401
  
    --- Diff: src/java/main/org/apache/zookeeper/ZooKeeper.java ---
    @@ -1325,6 +1325,20 @@ 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
    --- End diff --
    
    @hanm done


> 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)

Reply via email to