Class RouteAction.HashPolicy.Cookie.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<RouteAction.HashPolicy.Cookie.Builder>
com.google.protobuf.GeneratedMessage.Builder<RouteAction.HashPolicy.Cookie.Builder>
io.envoyproxy.envoy.config.route.v3.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.GeneratedMessage.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 type
envoy.config.route.v3.RouteAction.HashPolicy.Cookie
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate com.google.protobuf.RepeatedFieldBuilder
<RouteAction.HashPolicy.CookieAttribute, RouteAction.HashPolicy.CookieAttribute.Builder, RouteAction.HashPolicy.CookieAttributeOrBuilder> private int
private Object
private Object
private com.google.protobuf.Duration
private com.google.protobuf.SingleFieldBuilder
<com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllAttributes
(Iterable<? extends RouteAction.HashPolicy.CookieAttribute> values) Additional attributes for the cookie.addAttributes
(int index, RouteAction.HashPolicy.CookieAttribute value) Additional attributes for the cookie.addAttributes
(int index, RouteAction.HashPolicy.CookieAttribute.Builder builderForValue) Additional attributes for the cookie.Additional attributes for the cookie.addAttributes
(RouteAction.HashPolicy.CookieAttribute.Builder builderForValue) Additional attributes for the cookie.Additional attributes for the cookie.addAttributesBuilder
(int index) Additional attributes for the cookie.build()
private void
private void
clear()
Additional attributes for the cookie.The name of the cookie that will be used to obtain the hash key.The name of the path for the cookie.clearTtl()
If specified, a cookie with the TTL will be generated if the cookie is not present.private void
getAttributes
(int index) Additional attributes for the cookie.getAttributesBuilder
(int index) Additional attributes for the cookie.Additional attributes for the cookie.int
Additional attributes for the cookie.private com.google.protobuf.RepeatedFieldBuilder
<RouteAction.HashPolicy.CookieAttribute, RouteAction.HashPolicy.CookieAttribute.Builder, RouteAction.HashPolicy.CookieAttributeOrBuilder> Additional attributes for the cookie.getAttributesOrBuilder
(int index) Additional attributes for the cookie.Additional attributes for the cookie.static final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Descriptors.Descriptor
getName()
The name of the cookie that will be used to obtain the hash key.com.google.protobuf.ByteString
The name of the cookie that will be used to obtain the hash key.getPath()
The name of the path for the cookie.com.google.protobuf.ByteString
The name of the path for the cookie.com.google.protobuf.Duration
getTtl()
If specified, a cookie with the TTL will be generated if the cookie is not present.com.google.protobuf.Duration.Builder
If specified, a cookie with the TTL will be generated if the cookie is not present.private com.google.protobuf.SingleFieldBuilder
<com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> If specified, a cookie with the TTL will be generated if the cookie is not present.com.google.protobuf.DurationOrBuilder
If specified, a cookie with the TTL will be generated if the cookie is not present.boolean
hasTtl()
If specified, a cookie with the TTL will be generated if the cookie is not present.protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
final boolean
private void
mergeFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom
(com.google.protobuf.Message other) mergeTtl
(com.google.protobuf.Duration value) If specified, a cookie with the TTL will be generated if the cookie is not present.removeAttributes
(int index) Additional attributes for the cookie.setAttributes
(int index, RouteAction.HashPolicy.CookieAttribute value) Additional attributes for the cookie.setAttributes
(int index, RouteAction.HashPolicy.CookieAttribute.Builder builderForValue) Additional attributes for the cookie.The name of the cookie that will be used to obtain the hash key.setNameBytes
(com.google.protobuf.ByteString value) The name of the cookie that will be used to obtain the hash key.The name of the path for the cookie.setPathBytes
(com.google.protobuf.ByteString value) The name of the path for the cookie.setTtl
(com.google.protobuf.Duration value) If specified, a cookie with the TTL will be generated if the cookie is not present.setTtl
(com.google.protobuf.Duration.Builder builderForValue) If specified, a cookie with the TTL will be generated if the cookie is not present.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, 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
Methods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFrom
Methods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFrom
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
bitField0_
private int bitField0_ -
name_
-
ttl_
private com.google.protobuf.Duration ttl_ -
ttlBuilder_
private com.google.protobuf.SingleFieldBuilder<com.google.protobuf.Duration,com.google.protobuf.Duration.Builder, ttlBuilder_com.google.protobuf.DurationOrBuilder> -
path_
-
attributes_
-
attributesBuilder_
private com.google.protobuf.RepeatedFieldBuilder<RouteAction.HashPolicy.CookieAttribute,RouteAction.HashPolicy.CookieAttribute.Builder, attributesBuilder_RouteAction.HashPolicy.CookieAttributeOrBuilder>
-
-
Constructor Details
-
Builder
private Builder() -
Builder
private Builder(com.google.protobuf.AbstractMessage.BuilderParent parent)
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessage.Builder<RouteAction.HashPolicy.Cookie.Builder>
-
maybeForceBuilderInitialization
private void maybeForceBuilderInitialization() -
clear
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessage.Builder<RouteAction.HashPolicy.Cookie.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessage.Builder<RouteAction.HashPolicy.Cookie.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartialRepeatedFields
-
buildPartial0
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<RouteAction.HashPolicy.Cookie.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage.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:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<RouteAction.HashPolicy.Cookie.Builder>
- Throws:
IOException
-
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:
getName
in 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:
getNameBytes
in interfaceRouteAction.HashPolicy.CookieOrBuilder
- Returns:
- The bytes for name.
-
setName
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
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
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:
hasTtl
in 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:
getTtl
in interfaceRouteAction.HashPolicy.CookieOrBuilder
- Returns:
- The ttl.
-
setTtl
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
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
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:
getTtlOrBuilder
in interfaceRouteAction.HashPolicy.CookieOrBuilder
-
getTtlFieldBuilder
private com.google.protobuf.SingleFieldBuilder<com.google.protobuf.Duration,com.google.protobuf.Duration.Builder, getTtlFieldBuilder()com.google.protobuf.DurationOrBuilder> 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;
-
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:
getPath
in 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:
getPathBytes
in interfaceRouteAction.HashPolicy.CookieOrBuilder
- Returns:
- The bytes for path.
-
setPath
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
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
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.
-
ensureAttributesIsMutable
private void ensureAttributesIsMutable() -
getAttributesList
Additional attributes for the cookie. They will be used when generating a new cookie.
repeated .envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute attributes = 4;
- Specified by:
getAttributesList
in interfaceRouteAction.HashPolicy.CookieOrBuilder
-
getAttributesCount
public int getAttributesCount()Additional attributes for the cookie. They will be used when generating a new cookie.
repeated .envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute attributes = 4;
- Specified by:
getAttributesCount
in interfaceRouteAction.HashPolicy.CookieOrBuilder
-
getAttributes
Additional attributes for the cookie. They will be used when generating a new cookie.
repeated .envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute attributes = 4;
- Specified by:
getAttributes
in interfaceRouteAction.HashPolicy.CookieOrBuilder
-
setAttributes
public RouteAction.HashPolicy.Cookie.Builder setAttributes(int index, RouteAction.HashPolicy.CookieAttribute value) Additional attributes for the cookie. They will be used when generating a new cookie.
repeated .envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute attributes = 4;
-
setAttributes
public RouteAction.HashPolicy.Cookie.Builder setAttributes(int index, RouteAction.HashPolicy.CookieAttribute.Builder builderForValue) Additional attributes for the cookie. They will be used when generating a new cookie.
repeated .envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute attributes = 4;
-
addAttributes
public RouteAction.HashPolicy.Cookie.Builder addAttributes(RouteAction.HashPolicy.CookieAttribute value) Additional attributes for the cookie. They will be used when generating a new cookie.
repeated .envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute attributes = 4;
-
addAttributes
public RouteAction.HashPolicy.Cookie.Builder addAttributes(int index, RouteAction.HashPolicy.CookieAttribute value) Additional attributes for the cookie. They will be used when generating a new cookie.
repeated .envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute attributes = 4;
-
addAttributes
public RouteAction.HashPolicy.Cookie.Builder addAttributes(RouteAction.HashPolicy.CookieAttribute.Builder builderForValue) Additional attributes for the cookie. They will be used when generating a new cookie.
repeated .envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute attributes = 4;
-
addAttributes
public RouteAction.HashPolicy.Cookie.Builder addAttributes(int index, RouteAction.HashPolicy.CookieAttribute.Builder builderForValue) Additional attributes for the cookie. They will be used when generating a new cookie.
repeated .envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute attributes = 4;
-
addAllAttributes
public RouteAction.HashPolicy.Cookie.Builder addAllAttributes(Iterable<? extends RouteAction.HashPolicy.CookieAttribute> values) Additional attributes for the cookie. They will be used when generating a new cookie.
repeated .envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute attributes = 4;
-
clearAttributes
Additional attributes for the cookie. They will be used when generating a new cookie.
repeated .envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute attributes = 4;
-
removeAttributes
Additional attributes for the cookie. They will be used when generating a new cookie.
repeated .envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute attributes = 4;
-
getAttributesBuilder
Additional attributes for the cookie. They will be used when generating a new cookie.
repeated .envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute attributes = 4;
-
getAttributesOrBuilder
Additional attributes for the cookie. They will be used when generating a new cookie.
repeated .envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute attributes = 4;
- Specified by:
getAttributesOrBuilder
in interfaceRouteAction.HashPolicy.CookieOrBuilder
-
getAttributesOrBuilderList
Additional attributes for the cookie. They will be used when generating a new cookie.
repeated .envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute attributes = 4;
- Specified by:
getAttributesOrBuilderList
in interfaceRouteAction.HashPolicy.CookieOrBuilder
-
addAttributesBuilder
Additional attributes for the cookie. They will be used when generating a new cookie.
repeated .envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute attributes = 4;
-
addAttributesBuilder
Additional attributes for the cookie. They will be used when generating a new cookie.
repeated .envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute attributes = 4;
-
getAttributesBuilderList
Additional attributes for the cookie. They will be used when generating a new cookie.
repeated .envoy.config.route.v3.RouteAction.HashPolicy.CookieAttribute attributes = 4;
-
getAttributesFieldBuilder
private com.google.protobuf.RepeatedFieldBuilder<RouteAction.HashPolicy.CookieAttribute,RouteAction.HashPolicy.CookieAttribute.Builder, getAttributesFieldBuilder()RouteAction.HashPolicy.CookieAttributeOrBuilder>
-