Class DynamicEndpointGroupBuilder
java.lang.Object
com.linecorp.armeria.client.endpoint.AbstractDynamicEndpointGroupBuilder
com.linecorp.armeria.client.endpoint.DynamicEndpointGroupBuilder
- All Implemented Interfaces:
DynamicEndpointGroupSetters
@UnstableApi
public final class DynamicEndpointGroupBuilder
extends AbstractDynamicEndpointGroupBuilder
Builds a new
DynamicEndpointGroup
.-
Method Summary
Modifier and TypeMethodDescriptionallowEmptyEndpoints
(boolean allowEmptyEndpoints) Sets whether to allow an emptyEndpoint
list.build()
Returns a newly createdDynamicEndpointGroup
with the properties configured so far.selectionStrategy
(EndpointSelectionStrategy selectionStrategy) Sets theEndpointSelectionStrategy
of theDynamicEndpointGroup
.selectionTimeout
(Duration selectionTimeout) Sets the timeout to wait until a successfulEndpoint
selection.selectionTimeoutMillis
(long selectionTimeoutMillis) Sets the timeout to wait until a successfulEndpoint
selection.Methods inherited from class com.linecorp.armeria.client.endpoint.AbstractDynamicEndpointGroupBuilder
selectionTimeoutMillis, shouldAllowEmptyEndpoints
-
Method Details
-
selectionStrategy
Sets theEndpointSelectionStrategy
of theDynamicEndpointGroup
. If unspecified,EndpointSelectionStrategy.weightedRoundRobin()
is used. -
allowEmptyEndpoints
Description copied from interface:DynamicEndpointGroupSetters
- Specified by:
allowEmptyEndpoints
in interfaceDynamicEndpointGroupSetters
- Overrides:
allowEmptyEndpoints
in classAbstractDynamicEndpointGroupBuilder
-
selectionTimeout
Description copied from interface:DynamicEndpointGroupSetters
Sets the timeout to wait until a successfulEndpoint
selection.Duration.ZERO
disables the timeout. If unspecified,Flags.defaultConnectTimeoutMillis()
is used by default.- Specified by:
selectionTimeout
in interfaceDynamicEndpointGroupSetters
- Overrides:
selectionTimeout
in classAbstractDynamicEndpointGroupBuilder
-
selectionTimeoutMillis
Description copied from interface:DynamicEndpointGroupSetters
Sets the timeout to wait until a successfulEndpoint
selection.0
disables the timeout. If unspecified,Flags.defaultConnectTimeoutMillis()
is used by default.- Specified by:
selectionTimeoutMillis
in interfaceDynamicEndpointGroupSetters
- Overrides:
selectionTimeoutMillis
in classAbstractDynamicEndpointGroupBuilder
-
build
Returns a newly createdDynamicEndpointGroup
with the properties configured so far.
-