Class ImmutableProcessEventRecordValue
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableProcessEventRecordValue
- All Implemented Interfaces:
JsonSerializable,RecordValue,RecordValueWithVariables,ProcessEventRecordValue,ProcessInstanceRelated,TenantOwned
public final class ImmutableProcessEventRecordValue
extends Object
implements ProcessEventRecordValue
Immutable implementation of
ProcessEventRecordValue.
Use the builder to create immutable instances:
ImmutableProcessEventRecordValue.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableProcessEventRecordValue. -
Field Summary
Fields inherited from interface io.camunda.zeebe.protocol.record.value.TenantOwned
DEFAULT_TENANT_IDENTIFIER -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableProcessEventRecordValue.copyOf(ProcessEventRecordValue instance) Creates an immutable copy of aProcessEventRecordValuevalue.booleanThis instance is equal to all instances ofImmutableProcessEventRecordValuethat have equal attribute values.longlonglongReturns the identifier of the tenant that owns this entity.inthashCode()Returns a lazily computed hash code from attributes:variables,processInstanceKey,tenantId,scopeKey,targetElementId,processDefinitionKey.toString()Prints the immutable valueProcessEventRecordValuewith attribute values.withProcessDefinitionKey(long value) Copy the current immutable object by setting a value for theprocessDefinitionKeyattribute.withProcessInstanceKey(long value) Copy the current immutable object by setting a value for theprocessInstanceKeyattribute.withScopeKey(long value) Copy the current immutable object by setting a value for thescopeKeyattribute.withTargetElementId(String value) Copy the current immutable object by setting a value for thetargetElementIdattribute.withTenantId(String value) Copy the current immutable object by setting a value for thetenantIdattribute.withVariables(Map<String, ? extends Object> entries) Copy the current immutable object by replacing thevariablesmap with the specified map.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.camunda.zeebe.protocol.record.JsonSerializable
toJson
-
Method Details
-
getVariables
- Specified by:
getVariablesin interfaceRecordValueWithVariables- Returns:
- the variables of this record. Can be empty.
-
getProcessInstanceKey
public long getProcessInstanceKey()- Specified by:
getProcessInstanceKeyin interfaceProcessInstanceRelated- Returns:
- the key of the corresponding process instance
-
getTenantId
Returns the identifier of the tenant that owns this entity.- Specified by:
getTenantIdin interfaceTenantOwned
-
getScopeKey
public long getScopeKey()- Specified by:
getScopeKeyin interfaceProcessEventRecordValue- Returns:
- the key identifying the event's scope
-
getTargetElementId
- Specified by:
getTargetElementIdin interfaceProcessEventRecordValue- Returns:
- the ID of the element which should react to the event
-
getProcessDefinitionKey
public long getProcessDefinitionKey()- Specified by:
getProcessDefinitionKeyin interfaceProcessEventRecordValue- Returns:
- the key of the deployed process this instance belongs to.
-
withVariables
Copy the current immutable object by replacing thevariablesmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the variables map- Returns:
- A modified copy of
thisobject
-
withProcessInstanceKey
Copy the current immutable object by setting a value for theprocessInstanceKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for processInstanceKey- Returns:
- A modified copy of the
thisobject
-
withTenantId
Copy the current immutable object by setting a value for thetenantIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for tenantId (can benull)- Returns:
- A modified copy of the
thisobject
-
withScopeKey
Copy the current immutable object by setting a value for thescopeKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for scopeKey- Returns:
- A modified copy of the
thisobject
-
withTargetElementId
Copy the current immutable object by setting a value for thetargetElementIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for targetElementId (can benull)- Returns:
- A modified copy of the
thisobject
-
withProcessDefinitionKey
Copy the current immutable object by setting a value for theprocessDefinitionKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for processDefinitionKey- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableProcessEventRecordValuethat have equal attribute values. -
hashCode
public int hashCode()Returns a lazily computed hash code from attributes:variables,processInstanceKey,tenantId,scopeKey,targetElementId,processDefinitionKey. -
toString
Prints the immutable valueProcessEventRecordValuewith attribute values. -
copyOf
Creates an immutable copy of aProcessEventRecordValuevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable ProcessEventRecordValue instance
-
builder
Creates a builder forImmutableProcessEventRecordValue.ImmutableProcessEventRecordValue.builder() .putVariable|putAllVariables(String => Object) //variablesmappings .withProcessInstanceKey(long) // optionalprocessInstanceKey.withTenantId(String | null) // nullabletenantId.withScopeKey(long) // optionalscopeKey.withTargetElementId(String | null) // nullabletargetElementId.withProcessDefinitionKey(long) // optionalprocessDefinitionKey.build();- Returns:
- A new ImmutableProcessEventRecordValue builder
-