Class BackendServiceFailoverPolicy.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<BackendServiceFailoverPolicy.Builder>
com.google.cloud.compute.v1.BackendServiceFailoverPolicy.Builder
All Implemented Interfaces:
BackendServiceFailoverPolicyOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
BackendServiceFailoverPolicy

public static final class BackendServiceFailoverPolicy.Builder extends com.google.protobuf.GeneratedMessage.Builder<BackendServiceFailoverPolicy.Builder> implements BackendServiceFailoverPolicyOrBuilder
 For load balancers that have configurable
 failover:
 [Internal passthrough Network Load
 Balancers](https://cloud.google.com/load-balancing/docs/internal/failover-overview)
 and [external passthrough
 Network Load
 Balancers](https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview).
 On failover or failback, this field indicates whether connection draining
 will be honored. Google Cloud has a fixed connection draining timeout of
 10 minutes. A setting of true terminates existing TCP
 connections to the active pool during failover and failback, immediately
 draining traffic. A setting of false allows existing TCP
 connections to persist, even on VMs no longer in the active pool, for up
 to the duration of the connection draining timeout (10 minutes).
 
Protobuf type google.cloud.compute.v1.BackendServiceFailoverPolicy
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<BackendServiceFailoverPolicy.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<BackendServiceFailoverPolicy.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<BackendServiceFailoverPolicy.Builder>
    • getDefaultInstanceForType

      public BackendServiceFailoverPolicy getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public BackendServiceFailoverPolicy buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public BackendServiceFailoverPolicy.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<BackendServiceFailoverPolicy.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<BackendServiceFailoverPolicy.Builder>
    • mergeFrom

      public BackendServiceFailoverPolicy.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<BackendServiceFailoverPolicy.Builder>
      Throws:
      IOException
    • hasDisableConnectionDrainOnFailover

      public boolean hasDisableConnectionDrainOnFailover()
       This can be set to true if the protocol isTCP, UDP, or UNSPECIFIED.
      
       The default is false.
       
      optional bool disable_connection_drain_on_failover = 182150753;
      Specified by:
      hasDisableConnectionDrainOnFailover in interface BackendServiceFailoverPolicyOrBuilder
      Returns:
      Whether the disableConnectionDrainOnFailover field is set.
    • getDisableConnectionDrainOnFailover

      public boolean getDisableConnectionDrainOnFailover()
       This can be set to true if the protocol isTCP, UDP, or UNSPECIFIED.
      
       The default is false.
       
      optional bool disable_connection_drain_on_failover = 182150753;
      Specified by:
      getDisableConnectionDrainOnFailover in interface BackendServiceFailoverPolicyOrBuilder
      Returns:
      The disableConnectionDrainOnFailover.
    • setDisableConnectionDrainOnFailover

      public BackendServiceFailoverPolicy.Builder setDisableConnectionDrainOnFailover(boolean value)
       This can be set to true if the protocol isTCP, UDP, or UNSPECIFIED.
      
       The default is false.
       
      optional bool disable_connection_drain_on_failover = 182150753;
      Parameters:
      value - The disableConnectionDrainOnFailover to set.
      Returns:
      This builder for chaining.
    • clearDisableConnectionDrainOnFailover

      public BackendServiceFailoverPolicy.Builder clearDisableConnectionDrainOnFailover()
       This can be set to true if the protocol isTCP, UDP, or UNSPECIFIED.
      
       The default is false.
       
      optional bool disable_connection_drain_on_failover = 182150753;
      Returns:
      This builder for chaining.
    • hasDropTrafficIfUnhealthy

      public boolean hasDropTrafficIfUnhealthy()
       If set to true, connections to the
       load balancer are dropped when all primary and all backup backend VMs are
       unhealthy.If set to false, connections are distributed
       among all primary VMs when all primary and all backup backend VMs are
       unhealthy.
       For load balancers that have configurable
       failover:
       [Internal passthrough
       Network Load
       Balancers](https://cloud.google.com/load-balancing/docs/internal/failover-overview)
       and [external passthrough
       Network Load
       Balancers](https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview).
       The default is false.
       
      optional bool drop_traffic_if_unhealthy = 112289428;
      Specified by:
      hasDropTrafficIfUnhealthy in interface BackendServiceFailoverPolicyOrBuilder
      Returns:
      Whether the dropTrafficIfUnhealthy field is set.
    • getDropTrafficIfUnhealthy

      public boolean getDropTrafficIfUnhealthy()
       If set to true, connections to the
       load balancer are dropped when all primary and all backup backend VMs are
       unhealthy.If set to false, connections are distributed
       among all primary VMs when all primary and all backup backend VMs are
       unhealthy.
       For load balancers that have configurable
       failover:
       [Internal passthrough
       Network Load
       Balancers](https://cloud.google.com/load-balancing/docs/internal/failover-overview)
       and [external passthrough
       Network Load
       Balancers](https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview).
       The default is false.
       
      optional bool drop_traffic_if_unhealthy = 112289428;
      Specified by:
      getDropTrafficIfUnhealthy in interface BackendServiceFailoverPolicyOrBuilder
      Returns:
      The dropTrafficIfUnhealthy.
    • setDropTrafficIfUnhealthy

      public BackendServiceFailoverPolicy.Builder setDropTrafficIfUnhealthy(boolean value)
       If set to true, connections to the
       load balancer are dropped when all primary and all backup backend VMs are
       unhealthy.If set to false, connections are distributed
       among all primary VMs when all primary and all backup backend VMs are
       unhealthy.
       For load balancers that have configurable
       failover:
       [Internal passthrough
       Network Load
       Balancers](https://cloud.google.com/load-balancing/docs/internal/failover-overview)
       and [external passthrough
       Network Load
       Balancers](https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview).
       The default is false.
       
      optional bool drop_traffic_if_unhealthy = 112289428;
      Parameters:
      value - The dropTrafficIfUnhealthy to set.
      Returns:
      This builder for chaining.
    • clearDropTrafficIfUnhealthy

      public BackendServiceFailoverPolicy.Builder clearDropTrafficIfUnhealthy()
       If set to true, connections to the
       load balancer are dropped when all primary and all backup backend VMs are
       unhealthy.If set to false, connections are distributed
       among all primary VMs when all primary and all backup backend VMs are
       unhealthy.
       For load balancers that have configurable
       failover:
       [Internal passthrough
       Network Load
       Balancers](https://cloud.google.com/load-balancing/docs/internal/failover-overview)
       and [external passthrough
       Network Load
       Balancers](https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview).
       The default is false.
       
      optional bool drop_traffic_if_unhealthy = 112289428;
      Returns:
      This builder for chaining.
    • hasFailoverRatio

      public boolean hasFailoverRatio()
       The value of the field must be in the range[0, 1]. If the value is 0, the load balancer performs a
       failover when the number of healthy primary VMs equals zero.
       For all other values, the load balancer performs a failover when the
       total number of healthy primary VMs is less than this ratio.
       For load balancers that have configurable
       failover:
       [Internal TCP/UDP Load
       Balancing](https://cloud.google.com/load-balancing/docs/internal/failover-overview)
       and [external TCP/UDP Load
       Balancing](https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview).
       
      optional float failover_ratio = 212667006;
      Specified by:
      hasFailoverRatio in interface BackendServiceFailoverPolicyOrBuilder
      Returns:
      Whether the failoverRatio field is set.
    • getFailoverRatio

      public float getFailoverRatio()
       The value of the field must be in the range[0, 1]. If the value is 0, the load balancer performs a
       failover when the number of healthy primary VMs equals zero.
       For all other values, the load balancer performs a failover when the
       total number of healthy primary VMs is less than this ratio.
       For load balancers that have configurable
       failover:
       [Internal TCP/UDP Load
       Balancing](https://cloud.google.com/load-balancing/docs/internal/failover-overview)
       and [external TCP/UDP Load
       Balancing](https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview).
       
      optional float failover_ratio = 212667006;
      Specified by:
      getFailoverRatio in interface BackendServiceFailoverPolicyOrBuilder
      Returns:
      The failoverRatio.
    • setFailoverRatio

      public BackendServiceFailoverPolicy.Builder setFailoverRatio(float value)
       The value of the field must be in the range[0, 1]. If the value is 0, the load balancer performs a
       failover when the number of healthy primary VMs equals zero.
       For all other values, the load balancer performs a failover when the
       total number of healthy primary VMs is less than this ratio.
       For load balancers that have configurable
       failover:
       [Internal TCP/UDP Load
       Balancing](https://cloud.google.com/load-balancing/docs/internal/failover-overview)
       and [external TCP/UDP Load
       Balancing](https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview).
       
      optional float failover_ratio = 212667006;
      Parameters:
      value - The failoverRatio to set.
      Returns:
      This builder for chaining.
    • clearFailoverRatio

      public BackendServiceFailoverPolicy.Builder clearFailoverRatio()
       The value of the field must be in the range[0, 1]. If the value is 0, the load balancer performs a
       failover when the number of healthy primary VMs equals zero.
       For all other values, the load balancer performs a failover when the
       total number of healthy primary VMs is less than this ratio.
       For load balancers that have configurable
       failover:
       [Internal TCP/UDP Load
       Balancing](https://cloud.google.com/load-balancing/docs/internal/failover-overview)
       and [external TCP/UDP Load
       Balancing](https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview).
       
      optional float failover_ratio = 212667006;
      Returns:
      This builder for chaining.