Class ImmutableMessageBatchRecordValue
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableMessageBatchRecordValue
- All Implemented Interfaces:
JsonSerializable,RecordValue,MessageBatchRecordValue
public final class ImmutableMessageBatchRecordValue
extends Object
implements MessageBatchRecordValue
Immutable implementation of
MessageBatchRecordValue.
Use the builder to create immutable instances:
ImmutableMessageBatchRecordValue.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableMessageBatchRecordValue. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableMessageBatchRecordValue.copyOf(MessageBatchRecordValue instance) Creates an immutable copy of aMessageBatchRecordValuevalue.booleanThis instance is equal to all instances ofImmutableMessageBatchRecordValuethat have equal attribute values.inthashCode()Returns a lazily computed hash code from attributes:messageKeys.toString()Prints the immutable valueMessageBatchRecordValuewith attribute values.withMessageKeys(Iterable<? extends Long> elements) Copy the current immutable object with elements that replace the content ofmessageKeys.withMessageKeys(Long... elements) Copy the current immutable object with elements that replace the content ofmessageKeys.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
-
getMessageKeys
- Specified by:
getMessageKeysin interfaceMessageBatchRecordValue- Returns:
- list of the keys from the messages assigned to this batch
-
withMessageKeys
Copy the current immutable object with elements that replace the content ofmessageKeys.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withMessageKeys
Copy the current immutable object with elements that replace the content ofmessageKeys. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of messageKeys elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableMessageBatchRecordValuethat have equal attribute values. -
hashCode
public int hashCode()Returns a lazily computed hash code from attributes:messageKeys. -
toString
Prints the immutable valueMessageBatchRecordValuewith attribute values. -
copyOf
Creates an immutable copy of aMessageBatchRecordValuevalue. 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 MessageBatchRecordValue instance
-
builder
Creates a builder forImmutableMessageBatchRecordValue.ImmutableMessageBatchRecordValue.builder() .addMessageKey|addAllMessageKeys(Long) //messageKeyselements .build();- Returns:
- A new ImmutableMessageBatchRecordValue builder
-