Class ZooKeeperEndpointGroupBuilder
java.lang.Object
com.linecorp.armeria.common.zookeeper.AbstractCuratorFrameworkBuilder
com.linecorp.armeria.client.zookeeper.ZooKeeperEndpointGroupBuilder
- All Implemented Interfaces:
DynamicEndpointGroupSetters
public final class ZooKeeperEndpointGroupBuilder
extends AbstractCuratorFrameworkBuilder
implements DynamicEndpointGroupSetters
Builds a
ZooKeeperEndpointGroup
.-
Method Summary
Modifier and TypeMethodDescriptionallowEmptyEndpoints
(boolean allowEmptyEndpoints) Sets whether to allow an emptyEndpoint
list.build()
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 org.apache.curator.framework.CuratorFrameworkFactory.Builder> customizer) Specifies theConsumer
that customizes theCuratorFramework
.selectionStrategy
(EndpointSelectionStrategy selectionStrategy) Sets theEndpointSelectionStrategy
of theZooKeeperEndpointGroup
.selectionTimeout
(Duration selectionTimeout) Sets the timeout to wait until a successfulEndpoint
selection.selectionTimeoutMillis
(long selectionTimeoutMillis) Sets the timeout to wait until a successfulEndpoint
selection.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
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 org.apache.curator.framework.CuratorFrameworkFactory.Builder> customizer) Description copied from class:AbstractCuratorFrameworkBuilder
Specifies theConsumer
that customizes theCuratorFramework
.- Overrides:
customizer
in classAbstractCuratorFrameworkBuilder
-
allowEmptyEndpoints
Description copied from interface:DynamicEndpointGroupSetters
- Specified by:
allowEmptyEndpoints
in interfaceDynamicEndpointGroupSetters
-
selectionTimeout
Sets the timeout to wait until a successfulEndpoint
selection.Duration.ZERO
disables the timeout. If unspecified,Flags.defaultResponseTimeoutMillis()
is used by default.- Specified by:
selectionTimeout
in interfaceDynamicEndpointGroupSetters
-
selectionTimeoutMillis
Sets the timeout to wait until a successfulEndpoint
selection.0
disables the timeout. If unspecified,Flags.defaultResponseTimeoutMillis()
is used by default.- Specified by:
selectionTimeoutMillis
in interfaceDynamicEndpointGroupSetters
-