Class BuildIdAssignmentRule.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuildIdAssignmentRule.Builder>
com.google.protobuf.GeneratedMessageV3.Builder<BuildIdAssignmentRule.Builder>
io.temporal.api.taskqueue.v1.BuildIdAssignmentRule.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,BuildIdAssignmentRuleOrBuilder,Cloneable
- Enclosing class:
BuildIdAssignmentRule
public static final class BuildIdAssignmentRule.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<BuildIdAssignmentRule.Builder>
implements BuildIdAssignmentRuleOrBuilder
Assignment rules are applied to *new* Workflow and Activity executions at
schedule time to assign them to a Build ID.
Assignment rules will not be used in the following cases:
- Child Workflows or Continue-As-New Executions who inherit their
parent/previous Workflow's assigned Build ID (by setting the
`inherit_build_id` flag - default behavior in SDKs when the same Task Queue
is used.)
- An Activity that inherits the assigned Build ID of its Workflow (by
setting the `use_workflow_build_id` flag - default behavior in SDKs
when the same Task Queue is used.)
In absence of (applicable) redirect rules (`CompatibleBuildIdRedirectRule`s)
the task will be dispatched to Workers of the Build ID determined by the
assignment rules (or inherited). Otherwise, the final Build ID will be
determined by the redirect rules.
Once a Workflow completes its first Workflow Task in a particular Build ID it
stays in that Build ID regardless of changes to assignment rules. Redirect
rules can be used to move the workflow to another compatible Build ID.
When using Worker Versioning on a Task Queue, in the steady state,
there should typically be a single assignment rule to send all new executions
to the latest Build ID. Existence of at least one such "unconditional"
rule at all times is enforces by the system, unless the `force` flag is used
by the user when replacing/deleting these rules (for exceptional cases).
During a deployment, one or more additional rules can be added to assign a
subset of the tasks to a new Build ID based on a "ramp percentage".
When there are multiple assignment rules for a Task Queue, the rules are
evaluated in order, starting from index 0. The first applicable rule will be
applied and the rest will be ignored.
In the event that no assignment rule is applicable on a task (or the Task
Queue is simply not versioned), the tasks will be dispatched to an
unversioned Worker.
Protobuf type temporal.api.taskqueue.v1.BuildIdAssignmentRule-
Method Summary
Modifier and TypeMethodDescriptionaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()clearField(com.google.protobuf.Descriptors.FieldDescriptor field) clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) This ramp is useful for gradual Blue/Green deployments (and similar) where you want to send a certain portion of the traffic to the target Build ID.string target_build_id = 1;clone()static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorThis ramp is useful for gradual Blue/Green deployments (and similar) where you want to send a certain portion of the traffic to the target Build ID.This ramp is useful for gradual Blue/Green deployments (and similar) where you want to send a certain portion of the traffic to the target Build ID.This ramp is useful for gradual Blue/Green deployments (and similar) where you want to send a certain portion of the traffic to the target Build ID.string target_build_id = 1;com.google.protobuf.ByteStringstring target_build_id = 1;booleanThis ramp is useful for gradual Blue/Green deployments (and similar) where you want to send a certain portion of the traffic to the target Build ID.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(BuildIdAssignmentRule other) This ramp is useful for gradual Blue/Green deployments (and similar) where you want to send a certain portion of the traffic to the target Build ID.mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) This ramp is useful for gradual Blue/Green deployments (and similar) where you want to send a certain portion of the traffic to the target Build ID.setPercentageRamp(RampByPercentage.Builder builderForValue) This ramp is useful for gradual Blue/Green deployments (and similar) where you want to send a certain portion of the traffic to the target Build ID.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setTargetBuildId(String value) string target_build_id = 1;setTargetBuildIdBytes(com.google.protobuf.ByteString value) string target_build_id = 1;setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
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<BuildIdAssignmentRule.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<BuildIdAssignmentRule.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<BuildIdAssignmentRule.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.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<BuildIdAssignmentRule.Builder>
-
setField
public BuildIdAssignmentRule.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<BuildIdAssignmentRule.Builder>
-
clearField
public BuildIdAssignmentRule.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) - Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<BuildIdAssignmentRule.Builder>
-
clearOneof
public BuildIdAssignmentRule.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) - Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<BuildIdAssignmentRule.Builder>
-
setRepeatedField
public BuildIdAssignmentRule.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<BuildIdAssignmentRule.Builder>
-
addRepeatedField
public BuildIdAssignmentRule.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<BuildIdAssignmentRule.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<BuildIdAssignmentRule.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<BuildIdAssignmentRule.Builder>
-
mergeFrom
public BuildIdAssignmentRule.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<BuildIdAssignmentRule.Builder>- Throws:
IOException
-
getRampCase
- Specified by:
getRampCasein interfaceBuildIdAssignmentRuleOrBuilder
-
clearRamp
-
getTargetBuildId
string target_build_id = 1;- Specified by:
getTargetBuildIdin interfaceBuildIdAssignmentRuleOrBuilder- Returns:
- The targetBuildId.
-
getTargetBuildIdBytes
public com.google.protobuf.ByteString getTargetBuildIdBytes()string target_build_id = 1;- Specified by:
getTargetBuildIdBytesin interfaceBuildIdAssignmentRuleOrBuilder- Returns:
- The bytes for targetBuildId.
-
setTargetBuildId
string target_build_id = 1;- Parameters:
value- The targetBuildId to set.- Returns:
- This builder for chaining.
-
clearTargetBuildId
string target_build_id = 1;- Returns:
- This builder for chaining.
-
setTargetBuildIdBytes
string target_build_id = 1;- Parameters:
value- The bytes for targetBuildId to set.- Returns:
- This builder for chaining.
-
hasPercentageRamp
public boolean hasPercentageRamp()This ramp is useful for gradual Blue/Green deployments (and similar) where you want to send a certain portion of the traffic to the target Build ID.
.temporal.api.taskqueue.v1.RampByPercentage percentage_ramp = 3;- Specified by:
hasPercentageRampin interfaceBuildIdAssignmentRuleOrBuilder- Returns:
- Whether the percentageRamp field is set.
-
getPercentageRamp
This ramp is useful for gradual Blue/Green deployments (and similar) where you want to send a certain portion of the traffic to the target Build ID.
.temporal.api.taskqueue.v1.RampByPercentage percentage_ramp = 3;- Specified by:
getPercentageRampin interfaceBuildIdAssignmentRuleOrBuilder- Returns:
- The percentageRamp.
-
setPercentageRamp
This ramp is useful for gradual Blue/Green deployments (and similar) where you want to send a certain portion of the traffic to the target Build ID.
.temporal.api.taskqueue.v1.RampByPercentage percentage_ramp = 3; -
setPercentageRamp
This ramp is useful for gradual Blue/Green deployments (and similar) where you want to send a certain portion of the traffic to the target Build ID.
.temporal.api.taskqueue.v1.RampByPercentage percentage_ramp = 3; -
mergePercentageRamp
This ramp is useful for gradual Blue/Green deployments (and similar) where you want to send a certain portion of the traffic to the target Build ID.
.temporal.api.taskqueue.v1.RampByPercentage percentage_ramp = 3; -
clearPercentageRamp
This ramp is useful for gradual Blue/Green deployments (and similar) where you want to send a certain portion of the traffic to the target Build ID.
.temporal.api.taskqueue.v1.RampByPercentage percentage_ramp = 3; -
getPercentageRampBuilder
This ramp is useful for gradual Blue/Green deployments (and similar) where you want to send a certain portion of the traffic to the target Build ID.
.temporal.api.taskqueue.v1.RampByPercentage percentage_ramp = 3; -
getPercentageRampOrBuilder
This ramp is useful for gradual Blue/Green deployments (and similar) where you want to send a certain portion of the traffic to the target Build ID.
.temporal.api.taskqueue.v1.RampByPercentage percentage_ramp = 3;- Specified by:
getPercentageRampOrBuilderin interfaceBuildIdAssignmentRuleOrBuilder
-
setUnknownFields
public final BuildIdAssignmentRule.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<BuildIdAssignmentRule.Builder>
-
mergeUnknownFields
public final BuildIdAssignmentRule.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<BuildIdAssignmentRule.Builder>
-