Package io.envoyproxy.envoy.api.v2.route
Class RouteAction.HashPolicy.Cookie.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderType>
-
- com.google.protobuf.GeneratedMessageV3.Builder<RouteAction.HashPolicy.Cookie.Builder>
-
- io.envoyproxy.envoy.api.v2.route.RouteAction.HashPolicy.Cookie.Builder
-
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,RouteAction.HashPolicy.CookieOrBuilder,Cloneable
- Enclosing class:
- RouteAction.HashPolicy.Cookie
public static final class RouteAction.HashPolicy.Cookie.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<RouteAction.HashPolicy.Cookie.Builder> 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 typeenvoy.api.v2.route.RouteAction.HashPolicy.Cookie
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RouteAction.HashPolicy.Cookie.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)RouteAction.HashPolicy.Cookiebuild()RouteAction.HashPolicy.CookiebuildPartial()RouteAction.HashPolicy.Cookie.Builderclear()RouteAction.HashPolicy.Cookie.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)RouteAction.HashPolicy.Cookie.BuilderclearName()The name of the cookie that will be used to obtain the hash key.RouteAction.HashPolicy.Cookie.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)RouteAction.HashPolicy.Cookie.BuilderclearPath()The name of the path for the cookie.RouteAction.HashPolicy.Cookie.BuilderclearTtl()If specified, a cookie with the TTL will be generated if the cookie is not present.RouteAction.HashPolicy.Cookie.Builderclone()RouteAction.HashPolicy.CookiegetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()StringgetName()The name of the cookie that will be used to obtain the hash key.com.google.protobuf.ByteStringgetNameBytes()The name of the cookie that will be used to obtain the hash key.StringgetPath()The name of the path for the cookie.com.google.protobuf.ByteStringgetPathBytes()The name of the path for the cookie.com.google.protobuf.DurationgetTtl()If specified, a cookie with the TTL will be generated if the cookie is not present.com.google.protobuf.Duration.BuildergetTtlBuilder()If specified, a cookie with the TTL will be generated if the cookie is not present.com.google.protobuf.DurationOrBuildergetTtlOrBuilder()If specified, a cookie with the TTL will be generated if the cookie is not present.booleanhasTtl()If specified, a cookie with the TTL will be generated if the cookie is not present.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()RouteAction.HashPolicy.Cookie.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)RouteAction.HashPolicy.Cookie.BuildermergeFrom(com.google.protobuf.Message other)RouteAction.HashPolicy.Cookie.BuildermergeFrom(RouteAction.HashPolicy.Cookie other)RouteAction.HashPolicy.Cookie.BuildermergeTtl(com.google.protobuf.Duration value)If specified, a cookie with the TTL will be generated if the cookie is not present.RouteAction.HashPolicy.Cookie.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)RouteAction.HashPolicy.Cookie.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)RouteAction.HashPolicy.Cookie.BuildersetName(String value)The name of the cookie that will be used to obtain the hash key.RouteAction.HashPolicy.Cookie.BuildersetNameBytes(com.google.protobuf.ByteString value)The name of the cookie that will be used to obtain the hash key.RouteAction.HashPolicy.Cookie.BuildersetPath(String value)The name of the path for the cookie.RouteAction.HashPolicy.Cookie.BuildersetPathBytes(com.google.protobuf.ByteString value)The name of the path for the cookie.RouteAction.HashPolicy.Cookie.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)RouteAction.HashPolicy.Cookie.BuildersetTtl(com.google.protobuf.Duration value)If specified, a cookie with the TTL will be generated if the cookie is not present.RouteAction.HashPolicy.Cookie.BuildersetTtl(com.google.protobuf.Duration.Builder builderForValue)If specified, a cookie with the TTL will be generated if the cookie is not present.RouteAction.HashPolicy.Cookie.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<RouteAction.HashPolicy.Cookie.Builder>
-
clear
public RouteAction.HashPolicy.Cookie.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<RouteAction.HashPolicy.Cookie.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<RouteAction.HashPolicy.Cookie.Builder>
-
getDefaultInstanceForType
public RouteAction.HashPolicy.Cookie getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public RouteAction.HashPolicy.Cookie build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public RouteAction.HashPolicy.Cookie buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public RouteAction.HashPolicy.Cookie.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<RouteAction.HashPolicy.Cookie.Builder>
-
setField
public RouteAction.HashPolicy.Cookie.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RouteAction.HashPolicy.Cookie.Builder>
-
clearField
public RouteAction.HashPolicy.Cookie.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RouteAction.HashPolicy.Cookie.Builder>
-
clearOneof
public RouteAction.HashPolicy.Cookie.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<RouteAction.HashPolicy.Cookie.Builder>
-
setRepeatedField
public RouteAction.HashPolicy.Cookie.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RouteAction.HashPolicy.Cookie.Builder>
-
addRepeatedField
public RouteAction.HashPolicy.Cookie.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RouteAction.HashPolicy.Cookie.Builder>
-
mergeFrom
public RouteAction.HashPolicy.Cookie.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<RouteAction.HashPolicy.Cookie.Builder>
-
mergeFrom
public RouteAction.HashPolicy.Cookie.Builder mergeFrom(RouteAction.HashPolicy.Cookie other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<RouteAction.HashPolicy.Cookie.Builder>
-
mergeFrom
public RouteAction.HashPolicy.Cookie.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<RouteAction.HashPolicy.Cookie.Builder>- Throws:
IOException
-
getName
public 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) = { ... }- Specified by:
getNamein interfaceRouteAction.HashPolicy.CookieOrBuilder- Returns:
- The name.
-
getNameBytes
public 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) = { ... }- Specified by:
getNameBytesin interfaceRouteAction.HashPolicy.CookieOrBuilder- Returns:
- The bytes for name.
-
setName
public RouteAction.HashPolicy.Cookie.Builder setName(String value)
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) = { ... }- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
public RouteAction.HashPolicy.Cookie.Builder clearName()
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) = { ... }- Returns:
- This builder for chaining.
-
setNameBytes
public RouteAction.HashPolicy.Cookie.Builder setNameBytes(com.google.protobuf.ByteString value)
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) = { ... }- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
hasTtl
public 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;- Specified by:
hasTtlin interfaceRouteAction.HashPolicy.CookieOrBuilder- Returns:
- Whether the ttl field is set.
-
getTtl
public 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;- Specified by:
getTtlin interfaceRouteAction.HashPolicy.CookieOrBuilder- Returns:
- The ttl.
-
setTtl
public RouteAction.HashPolicy.Cookie.Builder setTtl(com.google.protobuf.Duration value)
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;
-
setTtl
public RouteAction.HashPolicy.Cookie.Builder setTtl(com.google.protobuf.Duration.Builder builderForValue)
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;
-
mergeTtl
public RouteAction.HashPolicy.Cookie.Builder mergeTtl(com.google.protobuf.Duration value)
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;
-
clearTtl
public RouteAction.HashPolicy.Cookie.Builder clearTtl()
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;
-
getTtlBuilder
public com.google.protobuf.Duration.Builder getTtlBuilder()
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
public 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;- Specified by:
getTtlOrBuilderin interfaceRouteAction.HashPolicy.CookieOrBuilder
-
getPath
public 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;- Specified by:
getPathin interfaceRouteAction.HashPolicy.CookieOrBuilder- Returns:
- The path.
-
getPathBytes
public 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;- Specified by:
getPathBytesin interfaceRouteAction.HashPolicy.CookieOrBuilder- Returns:
- The bytes for path.
-
setPath
public RouteAction.HashPolicy.Cookie.Builder setPath(String value)
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;- Parameters:
value- The path to set.- Returns:
- This builder for chaining.
-
clearPath
public RouteAction.HashPolicy.Cookie.Builder clearPath()
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;- Returns:
- This builder for chaining.
-
setPathBytes
public RouteAction.HashPolicy.Cookie.Builder setPathBytes(com.google.protobuf.ByteString value)
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;- Parameters:
value- The bytes for path to set.- Returns:
- This builder for chaining.
-
setUnknownFields
public final RouteAction.HashPolicy.Cookie.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<RouteAction.HashPolicy.Cookie.Builder>
-
mergeUnknownFields
public final RouteAction.HashPolicy.Cookie.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<RouteAction.HashPolicy.Cookie.Builder>
-
-