Class GcpMultiEndpointOptions.Builder

java.lang.Object
com.google.cloud.grpc.GcpMultiEndpointOptions.Builder
Enclosing class:
GcpMultiEndpointOptions

public static class GcpMultiEndpointOptions.Builder extends Object
  • Constructor Details

  • Method Details

    • build

      public GcpMultiEndpointOptions build()
    • withName

      @CanIgnoreReturnValue public GcpMultiEndpointOptions.Builder withName(String name)
      Sets the name of the MultiEndpoint.
      Parameters:
      name - MultiEndpoint name.
    • withEndpoints

      @CanIgnoreReturnValue public GcpMultiEndpointOptions.Builder withEndpoints(List<String> endpoints)
      Sets the endpoints of the MultiEndpoint.
      Parameters:
      endpoints - List of endpoints in the form of host:port in descending priority order.
    • withChannelConfigurator

      @CanIgnoreReturnValue public GcpMultiEndpointOptions.Builder withChannelConfigurator(com.google.api.core.ApiFunction<io.grpc.ManagedChannelBuilder<?>,io.grpc.ManagedChannelBuilder<?>> channelConfigurator)
      Sets the channel configurator for the MultiEndpoint channel pool.
      Parameters:
      channelConfigurator - function to perform on the ManagedChannelBuilder in the channel pool.
    • withChannelCredentials

      @CanIgnoreReturnValue public GcpMultiEndpointOptions.Builder withChannelCredentials(io.grpc.ChannelCredentials channelCredentials)
      Sets the channel credentials to use in the MultiEndpoint channel pool.
      Parameters:
      channelCredentials - channel credentials.
    • withRecoveryTimeout

      @CanIgnoreReturnValue public GcpMultiEndpointOptions.Builder withRecoveryTimeout(Duration recoveryTimeout)
      Sets the recovery timeout for the MultiEndpoint. See more info in the MultiEndpoint.
      Parameters:
      recoveryTimeout - recovery timeout.
    • withSwitchingDelay

      @CanIgnoreReturnValue 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.

      Parameters:
      switchingDelay - switching delay.