Class ImmutableErrorRecordValue.Builder
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableErrorRecordValue.Builder
- Enclosing class:
- ImmutableErrorRecordValue
Builds instances of type
ImmutableErrorRecordValue.
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 TypeMethodDescriptionbuild()Builds a newImmutableErrorRecordValue.clear()Clear the builder to the initial state.from(ErrorRecordValue instance) Fill a builder with attribute values from the providedErrorRecordValueinstance.withErrorEventPosition(long errorEventPosition) Initializes the value for theerrorEventPositionattribute.withExceptionMessage(String exceptionMessage) Initializes the value for theexceptionMessageattribute.withProcessInstanceKey(long processInstanceKey) Initializes the value for theprocessInstanceKeyattribute.withStacktrace(String stacktrace) Initializes the value for thestacktraceattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedErrorRecordValueinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
withExceptionMessage
Initializes the value for theexceptionMessageattribute.- Parameters:
exceptionMessage- The value for exceptionMessage (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withStacktrace
Initializes the value for thestacktraceattribute.- Parameters:
stacktrace- The value for stacktrace (can benull)- Returns:
thisbuilder for use in a chained invocation
-
withErrorEventPosition
Initializes the value for theerrorEventPositionattribute.- Parameters:
errorEventPosition- The value for errorEventPosition- Returns:
thisbuilder for use in a chained invocation
-
withProcessInstanceKey
Initializes the value for theprocessInstanceKeyattribute.- Parameters:
processInstanceKey- The value for processInstanceKey- 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 newImmutableErrorRecordValue.- Returns:
- An immutable instance of ErrorRecordValue
- Throws:
IllegalStateException- if any required attributes are missing
-