Class ImmutableMessageSubscriptionRecordValue
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableMessageSubscriptionRecordValue
- All Implemented Interfaces:
JsonSerializable,RecordValue,RecordValueWithVariables,MessageSubscriptionRecordValue,ProcessInstanceRelated
@ParametersAreNonnullByDefault
@Immutable
public final class ImmutableMessageSubscriptionRecordValue
extends Object
implements MessageSubscriptionRecordValue
Immutable implementation of
MessageSubscriptionRecordValue.
Use the builder to create immutable instances:
ImmutableMessageSubscriptionRecordValue.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableMessageSubscriptionRecordValue. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableMessageSubscriptionRecordValue.copyOf(MessageSubscriptionRecordValue instance) Creates an immutable copy of aMessageSubscriptionRecordValuevalue.booleanThis instance is equal to all instances ofImmutableMessageSubscriptionRecordValuethat have equal attribute values.longlonglonginthashCode()Returns a lazily computed hash code from attributes:variables,processInstanceKey,elementInstanceKey,bpmnProcessId,messageName,correlationKey,messageKey,interrupting.booleantoString()Prints the immutable valueMessageSubscriptionRecordValuewith attribute values.withBpmnProcessId(String value) Copy the current immutable object by setting a value for thebpmnProcessIdattribute.withCorrelationKey(String value) Copy the current immutable object by setting a value for thecorrelationKeyattribute.withElementInstanceKey(long value) Copy the current immutable object by setting a value for theelementInstanceKeyattribute.withInterrupting(boolean value) Copy the current immutable object by setting a value for theinterruptingattribute.withMessageKey(long value) Copy the current immutable object by setting a value for themessageKeyattribute.withMessageName(String value) Copy the current immutable object by setting a value for themessageNameattribute.withProcessInstanceKey(long value) Copy the current immutable object by setting a value for theprocessInstanceKeyattribute.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 interfaceMessageSubscriptionRecordValue- Specified by:
getProcessInstanceKeyin interfaceProcessInstanceRelated- Returns:
- the process instance key tied to the subscription
-
getElementInstanceKey
public long getElementInstanceKey()- Specified by:
getElementInstanceKeyin interfaceMessageSubscriptionRecordValue- Returns:
- the element instance key tied to the subscription
-
getBpmnProcessId
- Specified by:
getBpmnProcessIdin interfaceMessageSubscriptionRecordValue- Returns:
- the BPMN process id tied to the subscription
-
getMessageName
- Specified by:
getMessageNamein interfaceMessageSubscriptionRecordValue- Returns:
- the name of the message
-
getCorrelationKey
- Specified by:
getCorrelationKeyin interfaceMessageSubscriptionRecordValue- Returns:
- the correlation key
-
getMessageKey
public long getMessageKey()- Specified by:
getMessageKeyin interfaceMessageSubscriptionRecordValue- Returns:
- the key of the correlated message
-
isInterrupting
public boolean isInterrupting()- Specified by:
isInterruptingin interfaceMessageSubscriptionRecordValue- Returns:
trueif the event tied to the subscription is interrupting. Otherwise, it returnsfalseif the event is non-interrupting.
-
withVariables
public final ImmutableMessageSubscriptionRecordValue 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
-
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
-
withElementInstanceKey
Copy the current immutable object by setting a value for theelementInstanceKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for elementInstanceKey- Returns:
- A modified copy of the
thisobject
-
withBpmnProcessId
Copy the current immutable object by setting a value for thebpmnProcessIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for bpmnProcessId (can benull)- Returns:
- A modified copy of the
thisobject
-
withMessageName
Copy the current immutable object by setting a value for themessageNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for messageName (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
-
withInterrupting
Copy the current immutable object by setting a value for theinterruptingattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for interrupting- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableMessageSubscriptionRecordValuethat have equal attribute values. -
hashCode
public int hashCode()Returns a lazily computed hash code from attributes:variables,processInstanceKey,elementInstanceKey,bpmnProcessId,messageName,correlationKey,messageKey,interrupting. -
toString
Prints the immutable valueMessageSubscriptionRecordValuewith attribute values. -
copyOf
public static ImmutableMessageSubscriptionRecordValue copyOf(MessageSubscriptionRecordValue instance) Creates an immutable copy of aMessageSubscriptionRecordValuevalue. 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 MessageSubscriptionRecordValue instance
-
builder
Creates a builder forImmutableMessageSubscriptionRecordValue.ImmutableMessageSubscriptionRecordValue.builder() .putVariable|putAllVariables(String => Object) //variablesmappings .withProcessInstanceKey(long) // optionalprocessInstanceKey.withElementInstanceKey(long) // optionalelementInstanceKey.withBpmnProcessId(String | null) // nullablebpmnProcessId.withMessageName(String | null) // nullablemessageName.withCorrelationKey(String | null) // nullablecorrelationKey.withMessageKey(long) // optionalmessageKey.withInterrupting(boolean) // optionalinterrupting.build();- Returns:
- A new ImmutableMessageSubscriptionRecordValue builder
-