Send feedback
Class GcpMultiEndpointOptions.Builder (1.11.0)
Stay organized with collections
Save and categorize content based on your preferences.
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.
Send feedback
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-06-19 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-06-19 UTC."],[],[]]