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

Thomas Koch updated ZOOKEEPER-836:
----------------------------------

    Attachment: ZOOKEEPER-836.patch

This new patch version introduces the interface HostProvider with the most 
relevant method next(long spinDelay) which ClientCnxn uses to get the next Host 
to try.
A first implementation of this interface is included as StaticHostProvider 
which mostly reflects the behavior of the current code.

One difference to current behavior is:
Once a connection has been established, the StaticHostProvider is reseted to 
point to the first host in its internal list. The internal list however is 
still shuffled on instantiation.

ZOOKEEPER-338 and ZOOKEEPER-146 can be solved on top of this patch by providing 
additional implementations of HostProvider and allowing ZooKeeper to be 
instantiated with an instance of ClientCnxn.

> hostlist as string
> ------------------
>
>                 Key: ZOOKEEPER-836
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-836
>             Project: ZooKeeper
>          Issue Type: Sub-task
>          Components: java client
>    Affects Versions: 3.3.1
>            Reporter: Patrick Datko
>            Assignee: Thomas Koch
>         Attachments: ZOOKEEPER-836.patch, ZOOKEEPER-836.patch
>
>
> The hostlist is parsed in the ctor of ClientCnxn. This violates the rule of 
> not doing (too much) work in a ctor. Instead the ClientCnxn should receive an 
> object of class "HostSet". HostSet could then be instantiated e.g. with a 
> comma separated string.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to