Class ImmutableMessageCorrelationRecordValue
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableMessageCorrelationRecordValue
- All Implemented Interfaces:
JsonSerializable,RecordValue,RecordValueWithVariables,MessageCorrelationRecordValue,ProcessInstanceRelated,TenantOwned
public final class ImmutableMessageCorrelationRecordValue
extends Object
implements MessageCorrelationRecordValue
Immutable implementation of
MessageCorrelationRecordValue.
Use the builder to create immutable instances:
ImmutableMessageCorrelationRecordValue.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableMessageCorrelationRecordValue. -
Field Summary
Fields inherited from interface io.camunda.zeebe.protocol.record.value.TenantOwned
DEFAULT_TENANT_IDENTIFIER -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableMessageCorrelationRecordValue.copyOf(MessageCorrelationRecordValue instance) Creates an immutable copy of aMessageCorrelationRecordValuevalue.booleanThis instance is equal to all instances ofImmutableMessageCorrelationRecordValuethat have equal attribute values.longgetName()longlongintReturns the identifier of the tenant that owns this entity.inthashCode()Returns a lazily computed hash code from attributes:variables,tenantId,processInstanceKey,name,correlationKey,messageKey,requestId,requestStreamId.toString()Prints the immutable valueMessageCorrelationRecordValuewith attribute values.withCorrelationKey(String value) Copy the current immutable object by setting a value for thecorrelationKeyattribute.withMessageKey(long value) Copy the current immutable object by setting a value for themessageKeyattribute.Copy the current immutable object by setting a value for thenameattribute.withProcessInstanceKey(long value) Copy the current immutable object by setting a value for theprocessInstanceKeyattribute.withRequestId(long value) Copy the current immutable object by setting a value for therequestIdattribute.withRequestStreamId(int value) Copy the current immutable object by setting a value for therequestStreamIdattribute.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.
-
getTenantId
Returns the identifier of the tenant that owns this entity.- Specified by:
getTenantIdin interfaceTenantOwned
-
getProcessInstanceKey
public long getProcessInstanceKey()- Specified by:
getProcessInstanceKeyin interfaceProcessInstanceRelated- Returns:
- the key of the corresponding process instance
-
getName
- Specified by:
getNamein interfaceMessageCorrelationRecordValue- Returns:
- the name of the message
-
getCorrelationKey
- Specified by:
getCorrelationKeyin interfaceMessageCorrelationRecordValue- Returns:
- the correlation key of the message
-
getMessageKey
public long getMessageKey()- Specified by:
getMessageKeyin interfaceMessageCorrelationRecordValue- Returns:
- the key of the message
-
getRequestId
public long getRequestId()- Specified by:
getRequestIdin interfaceMessageCorrelationRecordValue- Returns:
- the request id of the initial correlate command
-
getRequestStreamId
public int getRequestStreamId()- Specified by:
getRequestStreamIdin interfaceMessageCorrelationRecordValue- Returns:
- the request stream id of the initial correlate command
-
withVariables
public final ImmutableMessageCorrelationRecordValue withVariables(Map<String, ? extends Object> entries) 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
-
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
-
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
-
withName
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name (can benull)- Returns:
- A modified copy of the
thisobject
-
withCorrelationKey
Copy the current immutable object by setting a value for thecorrelationKeyattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for correlationKey (can benull)- Returns:
- A modified copy of the
thisobject
-
withMessageKey
Copy the current immutable object by setting a value for themessageKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for messageKey- Returns:
- A modified copy of the
thisobject
-
withRequestId
Copy the current immutable object by setting a value for therequestIdattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for requestId- Returns:
- A modified copy of the
thisobject
-
withRequestStreamId
Copy the current immutable object by setting a value for therequestStreamIdattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for requestStreamId- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableMessageCorrelationRecordValuethat have equal attribute values. -
hashCode
public int hashCode()Returns a lazily computed hash code from attributes:variables,tenantId,processInstanceKey,name,correlationKey,messageKey,requestId,requestStreamId. -
toString
Prints the immutable valueMessageCorrelationRecordValuewith attribute values. -
copyOf
Creates an immutable copy of aMessageCorrelationRecordValuevalue. 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 MessageCorrelationRecordValue instance
-
builder
Creates a builder forImmutableMessageCorrelationRecordValue.ImmutableMessageCorrelationRecordValue.builder() .putVariable|putAllVariables(String => Object) //variablesmappings .withTenantId(String | null) // nullabletenantId.withProcessInstanceKey(long) // optionalprocessInstanceKey.withName(String | null) // nullablename.withCorrelationKey(String | null) // nullablecorrelationKey.withMessageKey(long) // optionalmessageKey.withRequestId(long) // optionalrequestId.withRequestStreamId(int) // optionalrequestStreamId.build();- Returns:
- A new ImmutableMessageCorrelationRecordValue builder
-