Class ImmutableJobRecordValue.Builder
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableJobRecordValue.Builder
- Enclosing class:
ImmutableJobRecordValue
Builds instances of type
ImmutableJobRecordValue.
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 TypeMethodDescriptionaddAllChangedAttributes(Iterable<String> elements) Adds elements tochangedAttributesset.addChangedAttribute(String element) Adds one element tochangedAttributesset.addChangedAttributes(String... elements) Adds elements tochangedAttributesset.build()Builds a newImmutableJobRecordValue.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(JobRecordValue instance) Fill a builder with attribute values from the providedio.camunda.zeebe.protocol.record.value.JobRecordValueinstance.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.putAllCustomHeaders(Map<String, ? extends String> entries) Put all mappings from the specified map as entries tocustomHeadersmap.putAllVariables(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries tovariablesmap.putCustomHeader(String key, String value) Put one entry to thecustomHeadersmap.putCustomHeader(Map.Entry<String, ? extends String> entry) Put one entry to thecustomHeadersmap.putVariable(String key, Object value) Put one entry to thevariablesmap.putVariable(Map.Entry<String, ? extends Object> entry) Put one entry to thevariablesmap.withBpmnProcessId(String bpmnProcessId) Initializes the value for thebpmnProcessIdattribute.withChangedAttributes(Iterable<String> elements) Sets or replaces all elements forchangedAttributesset.withCustomHeaders(Map<String, ? extends String> entries) Sets or replaces all mappings from the specified map as entries for thecustomHeadersmap.withDeadline(long deadline) Initializes the value for thedeadlineattribute.withElementId(String elementId) Initializes the value for theelementIdattribute.withElementInstanceKey(long elementInstanceKey) Initializes the value for theelementInstanceKeyattribute.withErrorCode(String errorCode) Initializes the value for theerrorCodeattribute.withErrorMessage(String errorMessage) Initializes the value for theerrorMessageattribute.withJobKind(JobKind jobKind) Initializes the value for thejobKindattribute.withJobListenerEventType(JobListenerEventType jobListenerEventType) Initializes the value for thejobListenerEventTypeattribute.withProcessDefinitionKey(long processDefinitionKey) Initializes the value for theprocessDefinitionKeyattribute.withProcessDefinitionVersion(int processDefinitionVersion) Initializes the value for theprocessDefinitionVersionattribute.withProcessInstanceKey(long processInstanceKey) Initializes the value for theprocessInstanceKeyattribute.withRecurringTime(long recurringTime) Initializes the value for therecurringTimeattribute.withRetries(int retries) Initializes the value for theretriesattribute.withRetryBackoff(long retryBackoff) Initializes the value for theretryBackoffattribute.withTenantId(String tenantId) Initializes the value for thetenantIdattribute.withTimeout(long timeout) Initializes the value for thetimeoutattribute.Initializes the value for thetypeattribute.withVariables(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for thevariablesmap.withWorker(String worker) Initializes the value for theworkerattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedio.camunda.zeebe.protocol.record.value.JobRecordValueinstance.- 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
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
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
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
-
withProcessInstanceKey
Initializes the value for theprocessInstanceKeyattribute.- Parameters:
processInstanceKey- The value for processInstanceKey- 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
-
withType
Initializes the value for thetypeattribute.- Parameters:
type- The value for type (can benull)- Returns:
thisbuilder for use in a chained invocation
-
putCustomHeader
Put one entry to thecustomHeadersmap.- Parameters:
key- The key in the customHeaders mapvalue- The associated value in the customHeaders map- Returns:
thisbuilder for use in a chained invocation
-
putCustomHeader
public final ImmutableJobRecordValue.Builder putCustomHeader(Map.Entry<String, ? extends String> entry) Put one entry to thecustomHeadersmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
withCustomHeaders
public final ImmutableJobRecordValue.Builder withCustomHeaders(Map<String, ? extends String> entries) Sets or replaces all mappings from the specified map as entries for thecustomHeadersmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the customHeaders map- Returns:
thisbuilder for use in a chained invocation
-
putAllCustomHeaders
public final ImmutableJobRecordValue.Builder putAllCustomHeaders(Map<String, ? extends String> entries) Put all mappings from the specified map as entries tocustomHeadersmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the customHeaders map- Returns:
thisbuilder for use in a chained invocation
-
withWorker
Initializes the value for theworkerattribute.- Parameters:
worker- The value for worker (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withRetries
Initializes the value for theretriesattribute.- Parameters:
retries- The value for retries- Returns:
thisbuilder for use in a chained invocation
-
withRetryBackoff
Initializes the value for theretryBackoffattribute.- Parameters:
retryBackoff- The value for retryBackoff- Returns:
thisbuilder for use in a chained invocation
-
withRecurringTime
Initializes the value for therecurringTimeattribute.- Parameters:
recurringTime- The value for recurringTime- Returns:
thisbuilder for use in a chained invocation
-
withDeadline
Initializes the value for thedeadlineattribute.- Parameters:
deadline- The value for deadline- Returns:
thisbuilder for use in a chained invocation
-
withTimeout
Initializes the value for thetimeoutattribute.- Parameters:
timeout- The value for timeout- Returns:
thisbuilder for use in a chained invocation
-
withErrorMessage
Initializes the value for theerrorMessageattribute.- Parameters:
errorMessage- The value for errorMessage (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withErrorCode
Initializes the value for theerrorCodeattribute.- Parameters:
errorCode- The value for errorCode (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withElementId
Initializes the value for theelementIdattribute.- Parameters:
elementId- The value for elementId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withElementInstanceKey
Initializes the value for theelementInstanceKeyattribute.- Parameters:
elementInstanceKey- The value for elementInstanceKey- Returns:
thisbuilder for use in a chained invocation
-
withBpmnProcessId
Initializes the value for thebpmnProcessIdattribute.- Parameters:
bpmnProcessId- The value for bpmnProcessId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withProcessDefinitionVersion
public final ImmutableJobRecordValue.Builder withProcessDefinitionVersion(int processDefinitionVersion) Initializes the value for theprocessDefinitionVersionattribute.- Parameters:
processDefinitionVersion- The value for processDefinitionVersion- Returns:
thisbuilder for use in a chained invocation
-
withProcessDefinitionKey
Initializes the value for theprocessDefinitionKeyattribute.- Parameters:
processDefinitionKey- The value for processDefinitionKey- Returns:
thisbuilder for use in a chained invocation
-
withJobKind
Initializes the value for thejobKindattribute.- Parameters:
jobKind- The value for jobKind (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withJobListenerEventType
public final ImmutableJobRecordValue.Builder withJobListenerEventType(JobListenerEventType jobListenerEventType) Initializes the value for thejobListenerEventTypeattribute.- Parameters:
jobListenerEventType- The value for jobListenerEventType (can benull)- Returns:
thisbuilder for use in a chained invocation
-
addChangedAttribute
Adds one element tochangedAttributesset.- Parameters:
element- A changedAttributes element- Returns:
thisbuilder for use in a chained invocation
-
addChangedAttributes
Adds elements tochangedAttributesset.- Parameters:
elements- An array of changedAttributes elements- Returns:
thisbuilder for use in a chained invocation
-
withChangedAttributes
Sets or replaces all elements forchangedAttributesset.- Parameters:
elements- An iterable of changedAttributes elements- Returns:
thisbuilder for use in a chained invocation
-
addAllChangedAttributes
Adds elements tochangedAttributesset.- Parameters:
elements- An iterable of changedAttributes elements- 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 newImmutableJobRecordValue.- Returns:
- An immutable instance of JobRecordValue
- Throws:
IllegalStateException- if any required attributes are missing
-