Class ImmutableMessageBatchRecordValue.Builder
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableMessageBatchRecordValue.Builder
- Enclosing class:
ImmutableMessageBatchRecordValue
Builds instances of type
ImmutableMessageBatchRecordValue.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionaddAllMessageKeys(Iterable<? extends Long> elements) Adds elements tomessageKeyslist.addMessageKey(Long element) Adds one element tomessageKeyslist.addMessageKeys(Long... elements) Adds elements tomessageKeyslist.build()Builds a newImmutableMessageBatchRecordValue.clear()Clear the builder to the initial state.from(MessageBatchRecordValue instance) Fill a builder with attribute values from the providedMessageBatchRecordValueinstance.withMessageKeys(Iterable<? extends Long> elements) Sets or replaces all elements formessageKeyslist.
-
Method Details
-
from
Fill a builder with attribute values from the providedMessageBatchRecordValueinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
addMessageKey
Adds one element tomessageKeyslist.- Parameters:
element- A messageKeys element- Returns:
thisbuilder for use in a chained invocation
-
addMessageKeys
Adds elements tomessageKeyslist.- Parameters:
elements- An array of messageKeys elements- Returns:
thisbuilder for use in a chained invocation
-
withMessageKeys
public final ImmutableMessageBatchRecordValue.Builder withMessageKeys(Iterable<? extends Long> elements) Sets or replaces all elements formessageKeyslist.- Parameters:
elements- An iterable of messageKeys elements- Returns:
thisbuilder for use in a chained invocation
-
addAllMessageKeys
public final ImmutableMessageBatchRecordValue.Builder addAllMessageKeys(Iterable<? extends Long> elements) Adds elements tomessageKeyslist.- Parameters:
elements- An iterable of messageKeys elements- Returns:
thisbuilder for use in a chained invocation
-
clear
Clear the builder to the initial state.- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableMessageBatchRecordValue.- Returns:
- An immutable instance of MessageBatchRecordValue
- Throws:
IllegalStateException- if any required attributes are missing
-