zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Enrico Olivelli (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (ZOOKEEPER-2697) Handle graceful stop of ZookKeeper client
Date Fri, 17 Feb 2017 13:53:41 GMT

     [ https://issues.apache.org/jira/browse/ZOOKEEPER-2697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Enrico Olivelli updated ZOOKEEPER-2697:
---------------------------------------
    Description: 
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.

  was:
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 is actually the code I am testing 
{code}
     public void close(int waitForShutdownTimeout) throws InterruptedException {
           if (waitForShutdownTimeout > 0) {
              testableWaitForShutdown(waitForShutdownTimeout);
           }
           close();
    }
{code}


> 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