Class ImmutableCommandDistributionRecordValue.Builder
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableCommandDistributionRecordValue.Builder
- Enclosing class:
ImmutableCommandDistributionRecordValue
Builds instances of type
ImmutableCommandDistributionRecordValue.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newImmutableCommandDistributionRecordValue.clear()Clear the builder to the initial state.Returns a builder forcommandValue.commandValueBuilder(ImmutableRecordValue.Builder commandValue) SetscommandValueto the provided builder.from(CommandDistributionRecordValue instance) Fill a builder with attribute values from the providedCommandDistributionRecordValueinstance.withCommandValue(RecordValue commandValue) Initializes the value for thecommandValueattribute.withIntent(Intent intent) Initializes the value for theintentattribute.withPartitionId(int partitionId) Initializes the value for thepartitionIdattribute.withQueueId(String queueId) Initializes the value for thequeueIdattribute.withValueType(ValueType valueType) Initializes the value for thevalueTypeattribute.
-
Method Details
-
from
public final ImmutableCommandDistributionRecordValue.Builder from(CommandDistributionRecordValue instance) Fill a builder with attribute values from the providedCommandDistributionRecordValueinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
withPartitionId
Initializes the value for thepartitionIdattribute.- Parameters:
partitionId- The value for partitionId- Returns:
thisbuilder for use in a chained invocation
-
withQueueId
Initializes the value for thequeueIdattribute.- Parameters:
queueId- The value for queueId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withValueType
Initializes the value for thevalueTypeattribute.- Parameters:
valueType- The value for valueType (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withIntent
Initializes the value for theintentattribute.- Parameters:
intent- The value for intent (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withCommandValue
public final ImmutableCommandDistributionRecordValue.Builder withCommandValue(RecordValue commandValue) Initializes the value for thecommandValueattribute.- Parameters:
commandValue- The value for commandValue (can benull)- Returns:
thisbuilder for use in a chained invocation
-
commandValueBuilder
Returns a builder forcommandValue. Once called, the attribute builder field is set to a new instance of the builder. If called more than once, returns the same builder instance. -
commandValueBuilder
public final ImmutableCommandDistributionRecordValue.Builder commandValueBuilder(ImmutableRecordValue.Builder commandValue) SetscommandValueto the provided builder. -
clear
Clear the builder to the initial state.- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableCommandDistributionRecordValue.- Returns:
- An immutable instance of CommandDistributionRecordValue
- Throws:
IllegalStateException- if any required attributes are missing
-