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.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)BackendServiceFailoverPolicybuild()BackendServiceFailoverPolicybuildPartial()BackendServiceFailoverPolicy.Builderclear()BackendServiceFailoverPolicy.BuilderclearDisableConnectionDrainOnFailover()This can be set to true only if the protocol is TCP.BackendServiceFailoverPolicy.BuilderclearDropTrafficIfUnhealthy()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.BuilderclearFailoverRatio()The value of the field must be in the range [0, 1].BackendServiceFailoverPolicy.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)BackendServiceFailoverPolicy.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)BackendServiceFailoverPolicy.Builderclone()BackendServiceFailoverPolicygetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()booleangetDisableConnectionDrainOnFailover()This can be set to true only if the protocol is TCP.booleangetDropTrafficIfUnhealthy()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.floatgetFailoverRatio()The value of the field must be in the range [0, 1].booleanhasDisableConnectionDrainOnFailover()This can be set to true only if the protocol is TCP.booleanhasDropTrafficIfUnhealthy()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.booleanhasFailoverRatio()The value of the field must be in the range [0, 1].protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()BackendServiceFailoverPolicy.BuildermergeFrom(BackendServiceFailoverPolicy other)BackendServiceFailoverPolicy.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)BackendServiceFailoverPolicy.BuildermergeFrom(com.google.protobuf.Message other)BackendServiceFailoverPolicy.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)BackendServiceFailoverPolicy.BuildersetDisableConnectionDrainOnFailover(boolean value)This can be set to true only if the protocol is TCP.BackendServiceFailoverPolicy.BuildersetDropTrafficIfUnhealthy(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.BuildersetFailoverRatio(float value)The value of the field must be in the range [0, 1].BackendServiceFailoverPolicy.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)BackendServiceFailoverPolicy.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)BackendServiceFailoverPolicy.BuildersetUnknownFields(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:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<BackendServiceFailoverPolicy.Builder>
-
clear
public BackendServiceFailoverPolicy.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<BackendServiceFailoverPolicy.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<BackendServiceFailoverPolicy.Builder>
-
getDefaultInstanceForType
public BackendServiceFailoverPolicy getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public BackendServiceFailoverPolicy build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public BackendServiceFailoverPolicy buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public BackendServiceFailoverPolicy.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<BackendServiceFailoverPolicy.Builder>
-
setField
public BackendServiceFailoverPolicy.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<BackendServiceFailoverPolicy.Builder>
-
clearField
public BackendServiceFailoverPolicy.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<BackendServiceFailoverPolicy.Builder>
-
clearOneof
public BackendServiceFailoverPolicy.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<BackendServiceFailoverPolicy.Builder>
-
setRepeatedField
public BackendServiceFailoverPolicy.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<BackendServiceFailoverPolicy.Builder>
-
addRepeatedField
public BackendServiceFailoverPolicy.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<BackendServiceFailoverPolicy.Builder>
-
mergeFrom
public BackendServiceFailoverPolicy.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<BackendServiceFailoverPolicy.Builder>
-
mergeFrom
public BackendServiceFailoverPolicy.Builder mergeFrom(BackendServiceFailoverPolicy other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin 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:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin 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:
hasDisableConnectionDrainOnFailoverin 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:
getDisableConnectionDrainOnFailoverin 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:
hasDropTrafficIfUnhealthyin 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:
getDropTrafficIfUnhealthyin 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:
hasFailoverRatioin 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:
getFailoverRatioin 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:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<BackendServiceFailoverPolicy.Builder>
-
mergeUnknownFields
public final BackendServiceFailoverPolicy.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<BackendServiceFailoverPolicy.Builder>
-
-