Class ImmutableMessageStartEventSubscriptionRecordValue
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableMessageStartEventSubscriptionRecordValue
- All Implemented Interfaces:
JsonSerializable,RecordValue,RecordValueWithVariables,MessageStartEventSubscriptionRecordValue
@ParametersAreNonnullByDefault
@Immutable
public final class ImmutableMessageStartEventSubscriptionRecordValue
extends Object
implements MessageStartEventSubscriptionRecordValue
Immutable implementation of
MessageStartEventSubscriptionRecordValue.
Use the builder to create immutable instances:
ImmutableMessageStartEventSubscriptionRecordValue.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableMessageStartEventSubscriptionRecordValue. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableMessageStartEventSubscriptionRecordValue.Creates an immutable copy of aMessageStartEventSubscriptionRecordValuevalue.booleanThis instance is equal to all instances ofImmutableMessageStartEventSubscriptionRecordValuethat have equal attribute values.longlonglonginthashCode()Returns a lazily computed hash code from attributes:variables,processDefinitionKey,bpmnProcessId,startEventId,messageName,processInstanceKey,correlationKey,messageKey.toString()Prints the immutable valueMessageStartEventSubscriptionRecordValuewith 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.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.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.withStartEventId(String value) Copy the current immutable object by setting a value for thestartEventIdattribute.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.
-
getProcessDefinitionKey
public long getProcessDefinitionKey()- Specified by:
getProcessDefinitionKeyin interfaceMessageStartEventSubscriptionRecordValue- Returns:
- the process key tied to the subscription
-
getBpmnProcessId
- Specified by:
getBpmnProcessIdin interfaceMessageStartEventSubscriptionRecordValue- Returns:
- the BPMN process id tied to the subscription
-
getStartEventId
- Specified by:
getStartEventIdin interfaceMessageStartEventSubscriptionRecordValue- Returns:
- the id of the start event tied to the subscription
-
getMessageName
- Specified by:
getMessageNamein interfaceMessageStartEventSubscriptionRecordValue- Returns:
- the name of the message
-
getProcessInstanceKey
public long getProcessInstanceKey()- Specified by:
getProcessInstanceKeyin interfaceMessageStartEventSubscriptionRecordValue- Returns:
- the key of the process instance that was created by this message. It is only set when a message is correlated to this subscription. Otherwise, it returns -1.
-
getCorrelationKey
- Specified by:
getCorrelationKeyin interfaceMessageStartEventSubscriptionRecordValue- Returns:
- the correlation key of the message. It is only set when a message is correlated to this subscription. Otherwise, it returns an empty string.
-
getMessageKey
public long getMessageKey()- Specified by:
getMessageKeyin interfaceMessageStartEventSubscriptionRecordValue- Returns:
- the key of the message. It is only set when a message is correlated to this subscription. Otherwise, it returns -1.
-
withVariables
public final ImmutableMessageStartEventSubscriptionRecordValue 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
-
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
-
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
-
withStartEventId
Copy the current immutable object by setting a value for thestartEventIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for startEventId (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
-
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
-
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
-
equals
This instance is equal to all instances ofImmutableMessageStartEventSubscriptionRecordValuethat have equal attribute values. -
hashCode
public int hashCode()Returns a lazily computed hash code from attributes:variables,processDefinitionKey,bpmnProcessId,startEventId,messageName,processInstanceKey,correlationKey,messageKey. -
toString
Prints the immutable valueMessageStartEventSubscriptionRecordValuewith attribute values. -
copyOf
public static ImmutableMessageStartEventSubscriptionRecordValue copyOf(MessageStartEventSubscriptionRecordValue instance) Creates an immutable copy of aMessageStartEventSubscriptionRecordValuevalue. 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 MessageStartEventSubscriptionRecordValue instance
-
builder
Creates a builder forImmutableMessageStartEventSubscriptionRecordValue.ImmutableMessageStartEventSubscriptionRecordValue.builder() .putVariable|putAllVariables(String => Object) //variablesmappings .withProcessDefinitionKey(long) // optionalprocessDefinitionKey.withBpmnProcessId(String | null) // nullablebpmnProcessId.withStartEventId(String | null) // nullablestartEventId.withMessageName(String | null) // nullablemessageName.withProcessInstanceKey(long) // optionalprocessInstanceKey.withCorrelationKey(String | null) // nullablecorrelationKey.withMessageKey(long) // optionalmessageKey.build();- Returns:
- A new ImmutableMessageStartEventSubscriptionRecordValue builder
-