Package com.google.cloud.compute.v1
Class BackendServiceFailoverPolicy.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.Builder<BackendServiceFailoverPolicy.Builder> implements BackendServiceFailoverPolicyOrBuilder
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). 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 typegoogle.cloud.compute.v1.BackendServiceFailoverPolicy
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BackendServiceFailoverPolicy.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
BackendServiceFailoverPolicy
build()
BackendServiceFailoverPolicy
buildPartial()
BackendServiceFailoverPolicy.Builder
clear()
BackendServiceFailoverPolicy.Builder
clearDisableConnectionDrainOnFailover()
This can be set to true only if the protocol is TCP.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.BackendServiceFailoverPolicy.Builder
clearFailoverRatio()
The value of the field must be in the range [0, 1].BackendServiceFailoverPolicy.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
BackendServiceFailoverPolicy.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
BackendServiceFailoverPolicy.Builder
clone()
BackendServiceFailoverPolicy
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
boolean
getDisableConnectionDrainOnFailover()
This can be set to true only if the protocol is TCP.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.float
getFailoverRatio()
The value of the field must be in the range [0, 1].boolean
hasDisableConnectionDrainOnFailover()
This can be set to true only if the protocol is TCP.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.boolean
hasFailoverRatio()
The value of the field must be in the range [0, 1].protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
BackendServiceFailoverPolicy.Builder
mergeFrom(BackendServiceFailoverPolicy other)
BackendServiceFailoverPolicy.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
BackendServiceFailoverPolicy.Builder
mergeFrom(com.google.protobuf.Message other)
BackendServiceFailoverPolicy.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
BackendServiceFailoverPolicy.Builder
setDisableConnectionDrainOnFailover(boolean value)
This can be set to true only if the protocol is TCP.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.BackendServiceFailoverPolicy.Builder
setFailoverRatio(float value)
The value of the field must be in the range [0, 1].BackendServiceFailoverPolicy.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
BackendServiceFailoverPolicy.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
BackendServiceFailoverPolicy.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<BackendServiceFailoverPolicy.Builder>
-
clear
public BackendServiceFailoverPolicy.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<BackendServiceFailoverPolicy.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<BackendServiceFailoverPolicy.Builder>
-
getDefaultInstanceForType
public BackendServiceFailoverPolicy getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public BackendServiceFailoverPolicy build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public BackendServiceFailoverPolicy buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public BackendServiceFailoverPolicy.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<BackendServiceFailoverPolicy.Builder>
-
setField
public BackendServiceFailoverPolicy.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<BackendServiceFailoverPolicy.Builder>
-
clearField
public BackendServiceFailoverPolicy.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<BackendServiceFailoverPolicy.Builder>
-
clearOneof
public BackendServiceFailoverPolicy.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<BackendServiceFailoverPolicy.Builder>
-
setRepeatedField
public BackendServiceFailoverPolicy.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<BackendServiceFailoverPolicy.Builder>
-
addRepeatedField
public BackendServiceFailoverPolicy.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<BackendServiceFailoverPolicy.Builder>
-
mergeFrom
public BackendServiceFailoverPolicy.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<BackendServiceFailoverPolicy.Builder>
-
mergeFrom
public BackendServiceFailoverPolicy.Builder mergeFrom(BackendServiceFailoverPolicy other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<BackendServiceFailoverPolicy.Builder>
-
mergeFrom
public BackendServiceFailoverPolicy.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<BackendServiceFailoverPolicy.Builder>
- Throws:
IOException
-
hasDisableConnectionDrainOnFailover
public boolean hasDisableConnectionDrainOnFailover()
This can be set to true only if the protocol is TCP. The default is false.
optional bool disable_connection_drain_on_failover = 182150753;
- Specified by:
hasDisableConnectionDrainOnFailover
in interfaceBackendServiceFailoverPolicyOrBuilder
- Returns:
- Whether the disableConnectionDrainOnFailover field is set.
-
getDisableConnectionDrainOnFailover
public boolean getDisableConnectionDrainOnFailover()
This can be set to true only if the protocol is TCP. The default is false.
optional bool disable_connection_drain_on_failover = 182150753;
- Specified by:
getDisableConnectionDrainOnFailover
in interfaceBackendServiceFailoverPolicyOrBuilder
- Returns:
- The disableConnectionDrainOnFailover.
-
setDisableConnectionDrainOnFailover
public BackendServiceFailoverPolicy.Builder setDisableConnectionDrainOnFailover(boolean value)
This can be set to true only if the protocol is TCP. 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 only if the protocol is TCP. 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 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). The default is false.
optional bool drop_traffic_if_unhealthy = 112289428;
- Specified by:
hasDropTrafficIfUnhealthy
in interfaceBackendServiceFailoverPolicyOrBuilder
- 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 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). The default is false.
optional bool drop_traffic_if_unhealthy = 112289428;
- Specified by:
getDropTrafficIfUnhealthy
in interfaceBackendServiceFailoverPolicyOrBuilder
- 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 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). 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 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). 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 interfaceBackendServiceFailoverPolicyOrBuilder
- 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 interfaceBackendServiceFailoverPolicyOrBuilder
- 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.
-
setUnknownFields
public final BackendServiceFailoverPolicy.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<BackendServiceFailoverPolicy.Builder>
-
mergeUnknownFields
public final BackendServiceFailoverPolicy.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<BackendServiceFailoverPolicy.Builder>
-
-