Package com.google.cloud.compute.v1
Enum BackendService.SessionAffinity
java.lang.Object
java.lang.Enum<BackendService.SessionAffinity>
com.google.cloud.compute.v1.BackendService.SessionAffinity
- All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite,com.google.protobuf.ProtocolMessageEnum,Serializable,Comparable<BackendService.SessionAffinity>
- Enclosing class:
- BackendService
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). sessionAffinity cannot be specified with haPolicy.Protobuf enum
google.cloud.compute.v1.BackendService.SessionAffinity-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription2-tuple hash on packet's source and destination IP addresses.1-tuple hash only on packet's source IP address.5-tuple hash on packet's source and destination IP addresses, IP protocol, and source and destination ports.3-tuple hash on packet's source and destination IP addresses, and IP protocol.Hash based on a cookie generated by the L7 loadbalancer.The hash is based on a user specified header field.The hash is based on a user provided cookie.No session affinity.Strong cookie-based affinity.A value indicating that the enum field is not set. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int1-tuple hash only on packet's source IP address.static final int5-tuple hash on packet's source and destination IP addresses, IP protocol, and source and destination ports.static final int3-tuple hash on packet's source and destination IP addresses, and IP protocol.static final int2-tuple hash on packet's source and destination IP addresses.static final intHash based on a cookie generated by the L7 loadbalancer.static final intThe hash is based on a user specified header field.static final intThe hash is based on a user provided cookie.static final intNo session affinity.static final intStrong cookie-based affinity.static final intA value indicating that the enum field is not set. -
Method Summary
Modifier and TypeMethodDescriptionforNumber(int value) static com.google.protobuf.Descriptors.EnumDescriptorfinal com.google.protobuf.Descriptors.EnumDescriptorfinal intfinal com.google.protobuf.Descriptors.EnumValueDescriptorstatic com.google.protobuf.Internal.EnumLiteMap<BackendService.SessionAffinity>valueOf(int value) Deprecated.valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) Returns the enum constant of this type with the specified 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.
-
Enum Constant Details
-
UNDEFINED_SESSION_AFFINITY
A value indicating that the enum field is not set.
UNDEFINED_SESSION_AFFINITY = 0; -
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; -
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; -
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; -
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; -
GENERATED_COOKIE
Hash based on a cookie generated by the L7 loadbalancer. Only valid for HTTP(S) load balancing.
GENERATED_COOKIE = 370321204; -
HEADER_FIELD
The hash is based on a user specified header field.
HEADER_FIELD = 200737960; -
HTTP_COOKIE
The hash is based on a user provided cookie.
HTTP_COOKIE = 494981627; -
NONE
No session affinity. Connections from the same client IP may go to any instance in the pool.
NONE = 2402104; -
STRONG_COOKIE_AFFINITY
Strong cookie-based affinity. Connections bearing the same cookie will be served by the same backend VM while that VM remains healthy, as long as the cookie has not expired.
STRONG_COOKIE_AFFINITY = 438628091; -
UNRECOGNIZED
-
-
Field Details
-
UNDEFINED_SESSION_AFFINITY_VALUE
public static final int UNDEFINED_SESSION_AFFINITY_VALUEA value indicating that the enum field is not set.
UNDEFINED_SESSION_AFFINITY = 0;- See Also:
-
CLIENT_IP_VALUE
public static final int CLIENT_IP_VALUE2-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;- See Also:
-
CLIENT_IP_NO_DESTINATION_VALUE
public static final int CLIENT_IP_NO_DESTINATION_VALUE1-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;- See Also:
-
CLIENT_IP_PORT_PROTO_VALUE
public static final int CLIENT_IP_PORT_PROTO_VALUE5-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;- See Also:
-
CLIENT_IP_PROTO_VALUE
public static final int CLIENT_IP_PROTO_VALUE3-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;- See Also:
-
GENERATED_COOKIE_VALUE
public static final int GENERATED_COOKIE_VALUEHash based on a cookie generated by the L7 loadbalancer. Only valid for HTTP(S) load balancing.
GENERATED_COOKIE = 370321204;- See Also:
-
HEADER_FIELD_VALUE
public static final int HEADER_FIELD_VALUEThe hash is based on a user specified header field.
HEADER_FIELD = 200737960;- See Also:
-
HTTP_COOKIE_VALUE
public static final int HTTP_COOKIE_VALUEThe hash is based on a user provided cookie.
HTTP_COOKIE = 494981627;- See Also:
-
NONE_VALUE
public static final int NONE_VALUENo session affinity. Connections from the same client IP may go to any instance in the pool.
NONE = 2402104;- See Also:
-
STRONG_COOKIE_AFFINITY_VALUE
public static final int STRONG_COOKIE_AFFINITY_VALUEStrong cookie-based affinity. Connections bearing the same cookie will be served by the same backend VM while that VM remains healthy, as long as the cookie has not expired.
STRONG_COOKIE_AFFINITY = 438628091;- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getNumber
public final int getNumber()- Specified by:
getNumberin interfacecom.google.protobuf.Internal.EnumLite- Specified by:
getNumberin interfacecom.google.protobuf.ProtocolMessageEnum
-
valueOf
Deprecated.Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
value- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
forNumber
- Parameters:
value- The numeric wire value of the corresponding enum entry.- Returns:
- The enum associated with the given numeric wire value.
-
internalGetValueMap
public static com.google.protobuf.Internal.EnumLiteMap<BackendService.SessionAffinity> internalGetValueMap() -
getValueDescriptor
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()- Specified by:
getValueDescriptorin interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptor
public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() -
valueOf
public static BackendService.SessionAffinity valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
desc- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-