Class ZooKeeperEndpointGroupBuilder
java.lang.Object
com.linecorp.armeria.common.zookeeper.AbstractCuratorFrameworkBuilder
com.linecorp.armeria.client.zookeeper.ZooKeeperEndpointGroupBuilder
Builds a
ZooKeeperEndpointGroup
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns a newly-createdZooKeeperEndpointGroup
based on the properties set so far.connectTimeout(Duration connectTimeout)
Sets the specified connect timeout.connectTimeoutMillis(long connectTimeoutMillis)
Sets the specified connect timeout in milliseconds.customizer(Consumer<? super CuratorFrameworkFactory.Builder> customizer)
Specifies theConsumer
that customizes theCuratorFramework
.selectionStrategy(EndpointSelectionStrategy selectionStrategy)
Sets theEndpointSelectionStrategy
of theZooKeeperEndpointGroup
.sessionTimeout(Duration sessionTimeout)
Sets the session timeout.sessionTimeoutMillis(long sessionTimeoutMillis)
Sets the session timeout in milliseconds.Methods inherited from class com.linecorp.armeria.common.zookeeper.AbstractCuratorFrameworkBuilder
buildCuratorFramework, isUserSpecifiedCuratorFramework, znodePath
-
Method Details
-
selectionStrategy
public ZooKeeperEndpointGroupBuilder selectionStrategy(EndpointSelectionStrategy selectionStrategy)Sets theEndpointSelectionStrategy
of theZooKeeperEndpointGroup
. -
build
Returns a newly-createdZooKeeperEndpointGroup
based on the properties set so far. -
connectTimeout
Description copied from class:AbstractCuratorFrameworkBuilder
Sets the specified connect timeout. 1000 ms is used by default.- Overrides:
connectTimeout
in classAbstractCuratorFrameworkBuilder
- Parameters:
connectTimeout
- the connect timeout
-
connectTimeoutMillis
Description copied from class:AbstractCuratorFrameworkBuilder
Sets the specified connect timeout in milliseconds. 1000 ms is used by default.- Overrides:
connectTimeoutMillis
in classAbstractCuratorFrameworkBuilder
- Parameters:
connectTimeoutMillis
- the connect timeout in milliseconds
-
sessionTimeout
Description copied from class:AbstractCuratorFrameworkBuilder
Sets the session timeout. 10000 ms is used by default.- Overrides:
sessionTimeout
in classAbstractCuratorFrameworkBuilder
- Parameters:
sessionTimeout
- the session timeout
-
sessionTimeoutMillis
Description copied from class:AbstractCuratorFrameworkBuilder
Sets the session timeout in milliseconds. 10000 ms is used by default.- Overrides:
sessionTimeoutMillis
in classAbstractCuratorFrameworkBuilder
- Parameters:
sessionTimeoutMillis
- the session timeout in milliseconds
-
customizer
public ZooKeeperEndpointGroupBuilder customizer(Consumer<? super CuratorFrameworkFactory.Builder> customizer)Description copied from class:AbstractCuratorFrameworkBuilder
Specifies theConsumer
that customizes theCuratorFramework
.- Overrides:
customizer
in classAbstractCuratorFrameworkBuilder
-