public static final class RouteAction.HashPolicy.Cookie extends com.google.protobuf.GeneratedMessageV3 implements RouteAction.HashPolicy.CookieOrBuilder
Envoy supports two types of cookie affinity:
1. Passive. Envoy takes a cookie that's present in the cookies header and
hashes on its value.
2. Generated. Envoy generates and sets a cookie with an expiration (TTL)
on the first request from the client in its response to the client,
based on the endpoint the request gets sent to. The client then
presents this on the next and all subsequent requests. The hash of
this is sufficient to ensure these requests get sent to the same
endpoint. The cookie is generated by hashing the source and
destination ports and addresses so that multiple independent HTTP2
streams on the same connection will independently receive the same
cookie, even if they arrive at the Envoy simultaneously.
Protobuf type envoy.config.route.v4alpha.RouteAction.HashPolicy.Cookie| Modifier and Type | Class and Description |
|---|---|
static class |
RouteAction.HashPolicy.Cookie.Builder
Envoy supports two types of cookie affinity:
1.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
NAME_FIELD_NUMBER |
static int |
PATH_FIELD_NUMBER |
static int |
TTL_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static RouteAction.HashPolicy.Cookie |
getDefaultInstance() |
RouteAction.HashPolicy.Cookie |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
String |
getName()
The name of the cookie that will be used to obtain the hash key.
|
com.google.protobuf.ByteString |
getNameBytes()
The name of the cookie that will be used to obtain the hash key.
|
com.google.protobuf.Parser<RouteAction.HashPolicy.Cookie> |
getParserForType() |
String |
getPath()
The name of the path for the cookie.
|
com.google.protobuf.ByteString |
getPathBytes()
The name of the path for the cookie.
|
int |
getSerializedSize() |
com.google.protobuf.Duration |
getTtl()
If specified, a cookie with the TTL will be generated if the cookie is
not present.
|
com.google.protobuf.DurationOrBuilder |
getTtlOrBuilder()
If specified, a cookie with the TTL will be generated if the cookie is
not present.
|
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
boolean |
hasTtl()
If specified, a cookie with the TTL will be generated if the cookie is
not present.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static RouteAction.HashPolicy.Cookie.Builder |
newBuilder() |
static RouteAction.HashPolicy.Cookie.Builder |
newBuilder(RouteAction.HashPolicy.Cookie prototype) |
RouteAction.HashPolicy.Cookie.Builder |
newBuilderForType() |
protected RouteAction.HashPolicy.Cookie.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static RouteAction.HashPolicy.Cookie |
parseDelimitedFrom(InputStream input) |
static RouteAction.HashPolicy.Cookie |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RouteAction.HashPolicy.Cookie |
parseFrom(byte[] data) |
static RouteAction.HashPolicy.Cookie |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RouteAction.HashPolicy.Cookie |
parseFrom(ByteBuffer data) |
static RouteAction.HashPolicy.Cookie |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RouteAction.HashPolicy.Cookie |
parseFrom(com.google.protobuf.ByteString data) |
static RouteAction.HashPolicy.Cookie |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RouteAction.HashPolicy.Cookie |
parseFrom(com.google.protobuf.CodedInputStream input) |
static RouteAction.HashPolicy.Cookie |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RouteAction.HashPolicy.Cookie |
parseFrom(InputStream input) |
static RouteAction.HashPolicy.Cookie |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<RouteAction.HashPolicy.Cookie> |
parser() |
RouteAction.HashPolicy.Cookie.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int NAME_FIELD_NUMBER
public static final int TTL_FIELD_NUMBER
public static final int PATH_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public String getName()
The name of the cookie that will be used to obtain the hash key. If the cookie is not present and ttl below is not set, no hash will be produced.
string name = 1 [(.validate.rules) = { ... }getName in interface RouteAction.HashPolicy.CookieOrBuilderpublic com.google.protobuf.ByteString getNameBytes()
The name of the cookie that will be used to obtain the hash key. If the cookie is not present and ttl below is not set, no hash will be produced.
string name = 1 [(.validate.rules) = { ... }getNameBytes in interface RouteAction.HashPolicy.CookieOrBuilderpublic boolean hasTtl()
If specified, a cookie with the TTL will be generated if the cookie is not present. If the TTL is present and zero, the generated cookie will be a session cookie.
.google.protobuf.Duration ttl = 2;hasTtl in interface RouteAction.HashPolicy.CookieOrBuilderpublic com.google.protobuf.Duration getTtl()
If specified, a cookie with the TTL will be generated if the cookie is not present. If the TTL is present and zero, the generated cookie will be a session cookie.
.google.protobuf.Duration ttl = 2;getTtl in interface RouteAction.HashPolicy.CookieOrBuilderpublic com.google.protobuf.DurationOrBuilder getTtlOrBuilder()
If specified, a cookie with the TTL will be generated if the cookie is not present. If the TTL is present and zero, the generated cookie will be a session cookie.
.google.protobuf.Duration ttl = 2;getTtlOrBuilder in interface RouteAction.HashPolicy.CookieOrBuilderpublic String getPath()
The name of the path for the cookie. If no path is specified here, no path will be set for the cookie.
string path = 3;getPath in interface RouteAction.HashPolicy.CookieOrBuilderpublic com.google.protobuf.ByteString getPathBytes()
The name of the path for the cookie. If no path is specified here, no path will be set for the cookie.
string path = 3;getPathBytes in interface RouteAction.HashPolicy.CookieOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static RouteAction.HashPolicy.Cookie parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RouteAction.HashPolicy.Cookie parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RouteAction.HashPolicy.Cookie parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RouteAction.HashPolicy.Cookie parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RouteAction.HashPolicy.Cookie parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RouteAction.HashPolicy.Cookie parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RouteAction.HashPolicy.Cookie parseFrom(InputStream input) throws IOException
IOExceptionpublic static RouteAction.HashPolicy.Cookie parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static RouteAction.HashPolicy.Cookie parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static RouteAction.HashPolicy.Cookie parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static RouteAction.HashPolicy.Cookie parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static RouteAction.HashPolicy.Cookie parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic RouteAction.HashPolicy.Cookie.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static RouteAction.HashPolicy.Cookie.Builder newBuilder()
public static RouteAction.HashPolicy.Cookie.Builder newBuilder(RouteAction.HashPolicy.Cookie prototype)
public RouteAction.HashPolicy.Cookie.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected RouteAction.HashPolicy.Cookie.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static RouteAction.HashPolicy.Cookie getDefaultInstance()
public static com.google.protobuf.Parser<RouteAction.HashPolicy.Cookie> parser()
public com.google.protobuf.Parser<RouteAction.HashPolicy.Cookie> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public RouteAction.HashPolicy.Cookie getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2018–2021 The Envoy Project. All rights reserved.