Class GcpMultiEndpointOptions.Builder (1.17.0)
1.17.0 (latest)
1.13.0
1.12.0
1.11.0
public static class GcpMultiEndpointOptions . Builder
Constructors
Builder(GcpMultiEndpointOptions options)
public Builder ( GcpMultiEndpointOptions options )
Builder(List<String> endpoints)
public Builder ( List<String> endpoints )
Methods
build()
public GcpMultiEndpointOptions build ()
withChannelConfigurator(ApiFunction<ManagedChannelBuilder<?>,ManagedChannelBuilder<?>> channelConfigurator)
public GcpMultiEndpointOptions . Builder withChannelConfigurator ( ApiFunction<ManagedChannelBuilder <? >, ManagedChannelBuilder <? >> channelConfigurator )
Sets the channel configurator for the MultiEndpoint channel pool.
Parameter
Name
Description
channelConfigurator
ApiFunction <io.grpc.ManagedChannelBuilder <? >,io.grpc.ManagedChannelBuilder <? >>function to perform on the ManagedChannelBuilder in the channel
pool.
withChannelCredentials(ChannelCredentials channelCredentials)
public GcpMultiEndpointOptions . Builder withChannelCredentials ( ChannelCredentials channelCredentials )
Sets the channel credentials to use in the MultiEndpoint channel pool.
Parameter
Name
Description
channelCredentials
io.grpc.ChannelCredentials channel credentials.
withEndpoints(List<String> endpoints)
public GcpMultiEndpointOptions . Builder withEndpoints ( List<String> endpoints )
Sets the endpoints of the MultiEndpoint.
Parameter
Name
Description
endpoints
List <String >List of endpoints in the form of host:port in descending priority order.
withName(String name)
public GcpMultiEndpointOptions . Builder withName ( String name )
Sets the name of the MultiEndpoint.
Parameter
Name
Description
name
String MultiEndpoint name.
withRecoveryTimeout(Duration recoveryTimeout)
public GcpMultiEndpointOptions . Builder withRecoveryTimeout ( Duration recoveryTimeout )
Sets the recovery timeout for the MultiEndpoint. See more info in the MultiEndpoint .
Parameter
Name
Description
recoveryTimeout
Duration recovery timeout.
withSwitchingDelay(Duration switchingDelay)
public GcpMultiEndpointOptions . Builder withSwitchingDelay ( Duration switchingDelay )
Sets the switching delay for the MultiEndpoint.
When switching between endpoints the MultiEndpoint will stick to previous endpoint for the
switching delay.
Parameter
Name
Description
switchingDelay
Duration switching delay.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-10-05 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-10-05 UTC."],[],[]]