Class ImmutableProcessInstanceBatchRecordValue
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableProcessInstanceBatchRecordValue
- All Implemented Interfaces:
JsonSerializable,RecordValue,ProcessInstanceBatchRecordValue,ProcessInstanceRelated
@ParametersAreNonnullByDefault
@Immutable
public final class ImmutableProcessInstanceBatchRecordValue
extends Object
implements ProcessInstanceBatchRecordValue
Immutable implementation of
ProcessInstanceBatchRecordValue.
Use the builder to create immutable instances:
ImmutableProcessInstanceBatchRecordValue.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableProcessInstanceBatchRecordValue. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableProcessInstanceBatchRecordValue.copyOf(ProcessInstanceBatchRecordValue instance) Creates an immutable copy of aProcessInstanceBatchRecordValuevalue.booleanThis instance is equal to all instances ofImmutableProcessInstanceBatchRecordValuethat have equal attribute values.longlonggetIndex()longinthashCode()Returns a lazily computed hash code from attributes:processInstanceKey,batchElementInstanceKey,index.toString()Prints the immutable valueProcessInstanceBatchRecordValuewith attribute values.withBatchElementInstanceKey(long value) Copy the current immutable object by setting a value for thebatchElementInstanceKeyattribute.withIndex(long value) Copy the current immutable object by setting a value for theindexattribute.withProcessInstanceKey(long value) Copy the current immutable object by setting a value for theprocessInstanceKeyattribute.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
-
getProcessInstanceKey
public long getProcessInstanceKey()- Specified by:
getProcessInstanceKeyin interfaceProcessInstanceRelated- Returns:
- the key of the corresponding process instance
-
getBatchElementInstanceKey
public long getBatchElementInstanceKey()- Specified by:
getBatchElementInstanceKeyin interfaceProcessInstanceBatchRecordValue- Returns:
- the element instance for which a batch action is being performed. This should be a container element (e.g. a subprocess).
-
getIndex
public long getIndex()- Specified by:
getIndexin interfaceProcessInstanceBatchRecordValue- Returns:
- an index used to keep track of where we are in our batch process and where to start the next batch.
-
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
-
withBatchElementInstanceKey
Copy the current immutable object by setting a value for thebatchElementInstanceKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for batchElementInstanceKey- Returns:
- A modified copy of the
thisobject
-
withIndex
Copy the current immutable object by setting a value for theindexattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for index- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableProcessInstanceBatchRecordValuethat have equal attribute values. -
hashCode
public int hashCode()Returns a lazily computed hash code from attributes:processInstanceKey,batchElementInstanceKey,index. -
toString
Prints the immutable valueProcessInstanceBatchRecordValuewith attribute values. -
copyOf
public static ImmutableProcessInstanceBatchRecordValue copyOf(ProcessInstanceBatchRecordValue instance) Creates an immutable copy of aProcessInstanceBatchRecordValuevalue. 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 ProcessInstanceBatchRecordValue instance
-
builder
Creates a builder forImmutableProcessInstanceBatchRecordValue.ImmutableProcessInstanceBatchRecordValue.builder() .withProcessInstanceKey(long) // optionalprocessInstanceKey.withBatchElementInstanceKey(long) // optionalbatchElementInstanceKey.withIndex(long) // optionalindex.build();- Returns:
- A new ImmutableProcessInstanceBatchRecordValue builder
-