Class ImmutableMessageCorrelationRecordValue.Builder
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableMessageCorrelationRecordValue.Builder
- Enclosing class:
ImmutableMessageCorrelationRecordValue
Builds instances of type
ImmutableMessageCorrelationRecordValue.
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 newImmutableMessageCorrelationRecordValue.clear()Clear the builder to the initial state.from(RecordValueWithVariables instance) Fill a builder with attribute values from the providedio.camunda.zeebe.protocol.record.RecordValueWithVariablesinstance.from(MessageCorrelationRecordValue instance) Fill a builder with attribute values from the providedio.camunda.zeebe.protocol.record.value.MessageCorrelationRecordValueinstance.from(ProcessInstanceRelated instance) Fill a builder with attribute values from the providedio.camunda.zeebe.protocol.record.value.ProcessInstanceRelatedinstance.from(TenantOwned instance) Fill a builder with attribute values from the providedio.camunda.zeebe.protocol.record.value.TenantOwnedinstance.putAllVariables(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries tovariablesmap.putVariable(String key, Object value) Put one entry to thevariablesmap.putVariable(Map.Entry<String, ? extends Object> entry) Put one entry to thevariablesmap.withCorrelationKey(String correlationKey) Initializes the value for thecorrelationKeyattribute.withMessageKey(long messageKey) Initializes the value for themessageKeyattribute.Initializes the value for thenameattribute.withProcessInstanceKey(long processInstanceKey) Initializes the value for theprocessInstanceKeyattribute.withRequestId(long requestId) Initializes the value for therequestIdattribute.withRequestStreamId(int requestStreamId) Initializes the value for therequestStreamIdattribute.withTenantId(String tenantId) Initializes the value for thetenantIdattribute.withVariables(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for thevariablesmap.
-
Method Details
-
from
public final ImmutableMessageCorrelationRecordValue.Builder from(MessageCorrelationRecordValue instance) Fill a builder with attribute values from the providedio.camunda.zeebe.protocol.record.value.MessageCorrelationRecordValueinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedio.camunda.zeebe.protocol.record.value.ProcessInstanceRelatedinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedio.camunda.zeebe.protocol.record.value.TenantOwnedinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedio.camunda.zeebe.protocol.record.RecordValueWithVariablesinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
putVariable
Put one entry to thevariablesmap.- Parameters:
key- The key in the variables mapvalue- The associated value in the variables map- Returns:
thisbuilder for use in a chained invocation
-
putVariable
public final ImmutableMessageCorrelationRecordValue.Builder putVariable(Map.Entry<String, ? extends Object> entry) Put one entry to thevariablesmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
withVariables
public final ImmutableMessageCorrelationRecordValue.Builder withVariables(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for thevariablesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the variables map- Returns:
thisbuilder for use in a chained invocation
-
putAllVariables
public final ImmutableMessageCorrelationRecordValue.Builder putAllVariables(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries tovariablesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the variables map- Returns:
thisbuilder for use in a chained invocation
-
withTenantId
Initializes the value for thetenantIdattribute.- Parameters:
tenantId- The value for tenantId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withProcessInstanceKey
public final ImmutableMessageCorrelationRecordValue.Builder withProcessInstanceKey(long processInstanceKey) Initializes the value for theprocessInstanceKeyattribute.- Parameters:
processInstanceKey- The value for processInstanceKey- Returns:
thisbuilder for use in a chained invocation
-
withName
Initializes the value for thenameattribute.- Parameters:
name- The value for name (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withCorrelationKey
public final ImmutableMessageCorrelationRecordValue.Builder withCorrelationKey(String correlationKey) Initializes the value for thecorrelationKeyattribute.- Parameters:
correlationKey- The value for correlationKey (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withMessageKey
Initializes the value for themessageKeyattribute.- Parameters:
messageKey- The value for messageKey- Returns:
thisbuilder for use in a chained invocation
-
withRequestId
Initializes the value for therequestIdattribute.- Parameters:
requestId- The value for requestId- Returns:
thisbuilder for use in a chained invocation
-
withRequestStreamId
public final ImmutableMessageCorrelationRecordValue.Builder withRequestStreamId(int requestStreamId) Initializes the value for therequestStreamIdattribute.- Parameters:
requestStreamId- The value for requestStreamId- Returns:
thisbuilder for use in a chained invocation
-
clear
Clear the builder to the initial state.- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableMessageCorrelationRecordValue.- Returns:
- An immutable instance of MessageCorrelationRecordValue
- Throws:
IllegalStateException- if any required attributes are missing
-