public static enum BackendService.SessionAffinity extends Enum<BackendService.SessionAffinity> implements com.google.protobuf.ProtocolMessageEnum
Type of session affinity to use. The default is NONE. Only NONE and HEADER_FIELD are 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. For more details, see: [Session Affinity](https://cloud.google.com/load-balancing/docs/backend-service#session_affinity).Protobuf enum
google.cloud.compute.v1.BackendService.SessionAffinity| Enum Constant and Description |
|---|
CLIENT_IP
2-tuple hash on packet's source and destination IP addresses.
|
CLIENT_IP_NO_DESTINATION
1-tuple hash only on packet's source IP address.
|
CLIENT_IP_PORT_PROTO
5-tuple hash on packet's source and destination IP addresses, IP protocol, and source and destination ports.
|
CLIENT_IP_PROTO
3-tuple hash on packet's source and destination IP addresses, and IP protocol.
|
GENERATED_COOKIE
Hash based on a cookie generated by the L7 loadbalancer.
|
HEADER_FIELD
The hash is based on a user specified header field.
|
HTTP_COOKIE
The hash is based on a user provided cookie.
|
NONE
No session affinity.
|
UNDEFINED_SESSION_AFFINITY
A value indicating that the enum field is not set.
|
UNRECOGNIZED |
| Modifier and Type | Field and Description |
|---|---|
static int |
CLIENT_IP_NO_DESTINATION_VALUE
1-tuple hash only on packet's source IP address.
|
static int |
CLIENT_IP_PORT_PROTO_VALUE
5-tuple hash on packet's source and destination IP addresses, IP protocol, and source and destination ports.
|
static int |
CLIENT_IP_PROTO_VALUE
3-tuple hash on packet's source and destination IP addresses, and IP protocol.
|
static int |
CLIENT_IP_VALUE
2-tuple hash on packet's source and destination IP addresses.
|
static int |
GENERATED_COOKIE_VALUE
Hash based on a cookie generated by the L7 loadbalancer.
|
static int |
HEADER_FIELD_VALUE
The hash is based on a user specified header field.
|
static int |
HTTP_COOKIE_VALUE
The hash is based on a user provided cookie.
|
static int |
NONE_VALUE
No session affinity.
|
static int |
UNDEFINED_SESSION_AFFINITY_VALUE
A value indicating that the enum field is not set.
|
| Modifier and Type | Method and Description |
|---|---|
static BackendService.SessionAffinity |
forNumber(int value) |
static com.google.protobuf.Descriptors.EnumDescriptor |
getDescriptor() |
com.google.protobuf.Descriptors.EnumDescriptor |
getDescriptorForType() |
int |
getNumber() |
com.google.protobuf.Descriptors.EnumValueDescriptor |
getValueDescriptor() |
static com.google.protobuf.Internal.EnumLiteMap<BackendService.SessionAffinity> |
internalGetValueMap() |
static BackendService.SessionAffinity |
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) |
static BackendService.SessionAffinity |
valueOf(int value)
Deprecated.
Use
forNumber(int) instead. |
static BackendService.SessionAffinity |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BackendService.SessionAffinity[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BackendService.SessionAffinity UNDEFINED_SESSION_AFFINITY
A value indicating that the enum field is not set.
UNDEFINED_SESSION_AFFINITY = 0;public static final BackendService.SessionAffinity CLIENT_IP
2-tuple hash on packet's source and destination IP addresses. Connections from the same source IP address to the same destination IP address will be served by the same backend VM while that VM remains healthy.
CLIENT_IP = 345665051;public static final BackendService.SessionAffinity CLIENT_IP_NO_DESTINATION
1-tuple hash only on packet's source IP address. Connections from the same source IP address will be served by the same backend VM while that VM remains healthy. This option can only be used for Internal TCP/UDP Load Balancing.
CLIENT_IP_NO_DESTINATION = 106122516;public static final BackendService.SessionAffinity CLIENT_IP_PORT_PROTO
5-tuple hash on packet's source and destination IP addresses, IP protocol, and source and destination ports. Connections for the same IP protocol from the same source IP address and port to the same destination IP address and port will be served by the same backend VM while that VM remains healthy. This option cannot be used for HTTP(S) load balancing.
CLIENT_IP_PORT_PROTO = 221722926;public static final BackendService.SessionAffinity CLIENT_IP_PROTO
3-tuple hash on packet's source and destination IP addresses, and IP protocol. Connections for the same IP protocol from the same source IP address to the same destination IP address will be served by the same backend VM while that VM remains healthy. This option cannot be used for HTTP(S) load balancing.
CLIENT_IP_PROTO = 25322148;public static final BackendService.SessionAffinity GENERATED_COOKIE
Hash based on a cookie generated by the L7 loadbalancer. Only valid for HTTP(S) load balancing.
GENERATED_COOKIE = 370321204;public static final BackendService.SessionAffinity HEADER_FIELD
The hash is based on a user specified header field.
HEADER_FIELD = 200737960;public static final BackendService.SessionAffinity HTTP_COOKIE
The hash is based on a user provided cookie.
HTTP_COOKIE = 494981627;public static final BackendService.SessionAffinity NONE
No session affinity. Connections from the same client IP may go to any instance in the pool.
NONE = 2402104;public static final BackendService.SessionAffinity UNRECOGNIZED
public static final int UNDEFINED_SESSION_AFFINITY_VALUE
A value indicating that the enum field is not set.
UNDEFINED_SESSION_AFFINITY = 0;public static final int CLIENT_IP_VALUE
2-tuple hash on packet's source and destination IP addresses. Connections from the same source IP address to the same destination IP address will be served by the same backend VM while that VM remains healthy.
CLIENT_IP = 345665051;public static final int CLIENT_IP_NO_DESTINATION_VALUE
1-tuple hash only on packet's source IP address. Connections from the same source IP address will be served by the same backend VM while that VM remains healthy. This option can only be used for Internal TCP/UDP Load Balancing.
CLIENT_IP_NO_DESTINATION = 106122516;public static final int CLIENT_IP_PORT_PROTO_VALUE
5-tuple hash on packet's source and destination IP addresses, IP protocol, and source and destination ports. Connections for the same IP protocol from the same source IP address and port to the same destination IP address and port will be served by the same backend VM while that VM remains healthy. This option cannot be used for HTTP(S) load balancing.
CLIENT_IP_PORT_PROTO = 221722926;public static final int CLIENT_IP_PROTO_VALUE
3-tuple hash on packet's source and destination IP addresses, and IP protocol. Connections for the same IP protocol from the same source IP address to the same destination IP address will be served by the same backend VM while that VM remains healthy. This option cannot be used for HTTP(S) load balancing.
CLIENT_IP_PROTO = 25322148;public static final int GENERATED_COOKIE_VALUE
Hash based on a cookie generated by the L7 loadbalancer. Only valid for HTTP(S) load balancing.
GENERATED_COOKIE = 370321204;public static final int HEADER_FIELD_VALUE
The hash is based on a user specified header field.
HEADER_FIELD = 200737960;public static final int HTTP_COOKIE_VALUE
The hash is based on a user provided cookie.
HTTP_COOKIE = 494981627;public static final int NONE_VALUE
No session affinity. Connections from the same client IP may go to any instance in the pool.
NONE = 2402104;public static BackendService.SessionAffinity[] values()
for (BackendService.SessionAffinity c : BackendService.SessionAffinity.values()) System.out.println(c);
public static BackendService.SessionAffinity valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic final int getNumber()
getNumber in interface com.google.protobuf.Internal.EnumLitegetNumber in interface com.google.protobuf.ProtocolMessageEnum@Deprecated public static BackendService.SessionAffinity valueOf(int value)
forNumber(int) instead.value - The numeric wire value of the corresponding enum entry.public static BackendService.SessionAffinity forNumber(int value)
value - The numeric wire value of the corresponding enum entry.public static com.google.protobuf.Internal.EnumLiteMap<BackendService.SessionAffinity> internalGetValueMap()
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnumpublic final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnumpublic static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
public static BackendService.SessionAffinity valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
Copyright © 2023 Google LLC. All rights reserved.