Class ConsistentHashLoadBalancerSettings.Builder (1.57.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
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ConsistentHashLoadBalancerSettings.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ConsistentHashLoadBalancerSettings.Builder
Overrides

build()

public ConsistentHashLoadBalancerSettings build()
Returns
Type Description
ConsistentHashLoadBalancerSettings

buildPartial()

public ConsistentHashLoadBalancerSettings buildPartial()
Returns
Type Description
ConsistentHashLoadBalancerSettings

clear()

public ConsistentHashLoadBalancerSettings.Builder clear()
Returns
Type Description
ConsistentHashLoadBalancerSettings.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public ConsistentHashLoadBalancerSettings.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
ConsistentHashLoadBalancerSettings.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public ConsistentHashLoadBalancerSettings.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
ConsistentHashLoadBalancerSettings.Builder
Overrides

clone()

public ConsistentHashLoadBalancerSettings.Builder clone()
Returns
Type Description
ConsistentHashLoadBalancerSettings.Builder
Overrides

getDefaultInstanceForType()

public ConsistentHashLoadBalancerSettings getDefaultInstanceForType()
Returns
Type Description
ConsistentHashLoadBalancerSettings

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
boolean

Whether the minimumRingSize field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ConsistentHashLoadBalancerSettings other)

public ConsistentHashLoadBalancerSettings.Builder mergeFrom(ConsistentHashLoadBalancerSettings other)
Parameter
Name Description
other ConsistentHashLoadBalancerSettings
Returns
Type Description
ConsistentHashLoadBalancerSettings.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ConsistentHashLoadBalancerSettings.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ConsistentHashLoadBalancerSettings.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public ConsistentHashLoadBalancerSettings.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
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
Name Description
value ConsistentHashLoadBalancerSettingsHttpCookie
Returns
Type Description
ConsistentHashLoadBalancerSettings.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ConsistentHashLoadBalancerSettings.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ConsistentHashLoadBalancerSettings.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public ConsistentHashLoadBalancerSettings.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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
Name Description
value ConsistentHashLoadBalancerSettingsHttpCookie
Returns
Type Description
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
Name Description
builderForValue ConsistentHashLoadBalancerSettingsHttpCookie.Builder
Returns
Type Description
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
Name Description
value String

The httpHeaderName to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for httpHeaderName to set.

Returns
Type Description
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
Name Description
value long

The minimumRingSize to set.

Returns
Type Description
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
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
ConsistentHashLoadBalancerSettings.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final ConsistentHashLoadBalancerSettings.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ConsistentHashLoadBalancerSettings.Builder
Overrides