Class ConsistentHashLoadBalancerSettings.Builder (1.21.0)

public static final class ConsistentHashLoadBalancerSettings.Builder extends GeneratedMessageV3.Builder<ConsistentHashLoadBalancerSettings.Builder> implements ConsistentHashLoadBalancerSettingsOrBuilder

This message defines settings for a consistent hash style load balancer.

Protobuf type google.cloud.compute.v1.ConsistentHashLoadBalancerSettings

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ConsistentHashLoadBalancerSettings.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ConsistentHashLoadBalancerSettings.Builder
Overrides

build()

public ConsistentHashLoadBalancerSettings build()
Returns
TypeDescription
ConsistentHashLoadBalancerSettings

buildPartial()

public ConsistentHashLoadBalancerSettings buildPartial()
Returns
TypeDescription
ConsistentHashLoadBalancerSettings

clear()

public ConsistentHashLoadBalancerSettings.Builder clear()
Returns
TypeDescription
ConsistentHashLoadBalancerSettings.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public ConsistentHashLoadBalancerSettings.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
ConsistentHashLoadBalancerSettings.Builder
Overrides

clearHttpCookie()

public ConsistentHashLoadBalancerSettings.Builder clearHttpCookie()

Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP_COOKIE. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.

optional .google.cloud.compute.v1.ConsistentHashLoadBalancerSettingsHttpCookie http_cookie = 6673915;

Returns
TypeDescription
ConsistentHashLoadBalancerSettings.Builder

clearHttpHeaderName()

public ConsistentHashLoadBalancerSettings.Builder clearHttpHeaderName()

The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER_FIELD.

optional string http_header_name = 234798022;

Returns
TypeDescription
ConsistentHashLoadBalancerSettings.Builder

This builder for chaining.

clearMinimumRingSize()

public ConsistentHashLoadBalancerSettings.Builder clearMinimumRingSize()

The minimum number of virtual nodes to use for the hash ring. Defaults to 1024. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node.

optional int64 minimum_ring_size = 234380735;

Returns
TypeDescription
ConsistentHashLoadBalancerSettings.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public ConsistentHashLoadBalancerSettings.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
ConsistentHashLoadBalancerSettings.Builder
Overrides

clone()

public ConsistentHashLoadBalancerSettings.Builder clone()
Returns
TypeDescription
ConsistentHashLoadBalancerSettings.Builder
Overrides

getDefaultInstanceForType()

public ConsistentHashLoadBalancerSettings getDefaultInstanceForType()
Returns
TypeDescription
ConsistentHashLoadBalancerSettings

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getHttpCookie()

public ConsistentHashLoadBalancerSettingsHttpCookie getHttpCookie()

Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP_COOKIE. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.

optional .google.cloud.compute.v1.ConsistentHashLoadBalancerSettingsHttpCookie http_cookie = 6673915;

Returns
TypeDescription
ConsistentHashLoadBalancerSettingsHttpCookie

The httpCookie.

getHttpCookieBuilder()

public ConsistentHashLoadBalancerSettingsHttpCookie.Builder getHttpCookieBuilder()

Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP_COOKIE. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.

optional .google.cloud.compute.v1.ConsistentHashLoadBalancerSettingsHttpCookie http_cookie = 6673915;

Returns
TypeDescription
ConsistentHashLoadBalancerSettingsHttpCookie.Builder

getHttpCookieOrBuilder()

public ConsistentHashLoadBalancerSettingsHttpCookieOrBuilder getHttpCookieOrBuilder()

Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP_COOKIE. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.

optional .google.cloud.compute.v1.ConsistentHashLoadBalancerSettingsHttpCookie http_cookie = 6673915;

Returns
TypeDescription
ConsistentHashLoadBalancerSettingsHttpCookieOrBuilder

getHttpHeaderName()

public String getHttpHeaderName()

The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER_FIELD.

optional string http_header_name = 234798022;

Returns
TypeDescription
String

The httpHeaderName.

getHttpHeaderNameBytes()

public ByteString getHttpHeaderNameBytes()

The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER_FIELD.

optional string http_header_name = 234798022;

Returns
TypeDescription
ByteString

The bytes for httpHeaderName.

getMinimumRingSize()

public long getMinimumRingSize()

The minimum number of virtual nodes to use for the hash ring. Defaults to 1024. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node.

optional int64 minimum_ring_size = 234380735;

Returns
TypeDescription
long

The minimumRingSize.

hasHttpCookie()

public boolean hasHttpCookie()

Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP_COOKIE. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.

optional .google.cloud.compute.v1.ConsistentHashLoadBalancerSettingsHttpCookie http_cookie = 6673915;

Returns
TypeDescription
boolean

Whether the httpCookie field is set.

hasHttpHeaderName()

public boolean hasHttpHeaderName()

The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER_FIELD.

optional string http_header_name = 234798022;

Returns
TypeDescription
boolean

Whether the httpHeaderName field is set.

hasMinimumRingSize()

public boolean hasMinimumRingSize()

The minimum number of virtual nodes to use for the hash ring. Defaults to 1024. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node.

optional int64 minimum_ring_size = 234380735;

Returns
TypeDescription
boolean

Whether the minimumRingSize field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ConsistentHashLoadBalancerSettings other)

public ConsistentHashLoadBalancerSettings.Builder mergeFrom(ConsistentHashLoadBalancerSettings other)
Parameter
NameDescription
otherConsistentHashLoadBalancerSettings
Returns
TypeDescription
ConsistentHashLoadBalancerSettings.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ConsistentHashLoadBalancerSettings.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ConsistentHashLoadBalancerSettings.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public ConsistentHashLoadBalancerSettings.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
ConsistentHashLoadBalancerSettings.Builder
Overrides

mergeHttpCookie(ConsistentHashLoadBalancerSettingsHttpCookie value)

public ConsistentHashLoadBalancerSettings.Builder mergeHttpCookie(ConsistentHashLoadBalancerSettingsHttpCookie value)

Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP_COOKIE. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.

optional .google.cloud.compute.v1.ConsistentHashLoadBalancerSettingsHttpCookie http_cookie = 6673915;

Parameter
NameDescription
valueConsistentHashLoadBalancerSettingsHttpCookie
Returns
TypeDescription
ConsistentHashLoadBalancerSettings.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ConsistentHashLoadBalancerSettings.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ConsistentHashLoadBalancerSettings.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public ConsistentHashLoadBalancerSettings.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ConsistentHashLoadBalancerSettings.Builder
Overrides

setHttpCookie(ConsistentHashLoadBalancerSettingsHttpCookie value)

public ConsistentHashLoadBalancerSettings.Builder setHttpCookie(ConsistentHashLoadBalancerSettingsHttpCookie value)

Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP_COOKIE. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.

optional .google.cloud.compute.v1.ConsistentHashLoadBalancerSettingsHttpCookie http_cookie = 6673915;

Parameter
NameDescription
valueConsistentHashLoadBalancerSettingsHttpCookie
Returns
TypeDescription
ConsistentHashLoadBalancerSettings.Builder

setHttpCookie(ConsistentHashLoadBalancerSettingsHttpCookie.Builder builderForValue)

public ConsistentHashLoadBalancerSettings.Builder setHttpCookie(ConsistentHashLoadBalancerSettingsHttpCookie.Builder builderForValue)

Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP_COOKIE. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.

optional .google.cloud.compute.v1.ConsistentHashLoadBalancerSettingsHttpCookie http_cookie = 6673915;

Parameter
NameDescription
builderForValueConsistentHashLoadBalancerSettingsHttpCookie.Builder
Returns
TypeDescription
ConsistentHashLoadBalancerSettings.Builder

setHttpHeaderName(String value)

public ConsistentHashLoadBalancerSettings.Builder setHttpHeaderName(String value)

The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER_FIELD.

optional string http_header_name = 234798022;

Parameter
NameDescription
valueString

The httpHeaderName to set.

Returns
TypeDescription
ConsistentHashLoadBalancerSettings.Builder

This builder for chaining.

setHttpHeaderNameBytes(ByteString value)

public ConsistentHashLoadBalancerSettings.Builder setHttpHeaderNameBytes(ByteString value)

The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER_FIELD.

optional string http_header_name = 234798022;

Parameter
NameDescription
valueByteString

The bytes for httpHeaderName to set.

Returns
TypeDescription
ConsistentHashLoadBalancerSettings.Builder

This builder for chaining.

setMinimumRingSize(long value)

public ConsistentHashLoadBalancerSettings.Builder setMinimumRingSize(long value)

The minimum number of virtual nodes to use for the hash ring. Defaults to 1024. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node.

optional int64 minimum_ring_size = 234380735;

Parameter
NameDescription
valuelong

The minimumRingSize to set.

Returns
TypeDescription
ConsistentHashLoadBalancerSettings.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public ConsistentHashLoadBalancerSettings.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
ConsistentHashLoadBalancerSettings.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final ConsistentHashLoadBalancerSettings.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ConsistentHashLoadBalancerSettings.Builder
Overrides