Class ImmutableCheckpointRecordValue
java.lang.Object
io.camunda.zeebe.protocol.record.value.management.ImmutableCheckpointRecordValue
- All Implemented Interfaces:
JsonSerializable,RecordValue,CheckpointRecordValue
@ParametersAreNonnullByDefault
@Immutable
public final class ImmutableCheckpointRecordValue
extends Object
implements CheckpointRecordValue
Immutable implementation of
CheckpointRecordValue.
Use the builder to create immutable instances:
ImmutableCheckpointRecordValue.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableCheckpointRecordValue. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableCheckpointRecordValue.copyOf(CheckpointRecordValue instance) Creates an immutable copy of aCheckpointRecordValuevalue.booleanThis instance is equal to all instances ofImmutableCheckpointRecordValuethat have equal attribute values.longlonginthashCode()Returns a lazily computed hash code from attributes:checkpointId,checkpointPosition.toString()Prints the immutable valueCheckpointRecordValuewith attribute values.withCheckpointId(long value) Copy the current immutable object by setting a value for thecheckpointIdattribute.withCheckpointPosition(long value) Copy the current immutable object by setting a value for thecheckpointPositionattribute.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
-
getCheckpointId
public long getCheckpointId()- Specified by:
getCheckpointIdin interfaceCheckpointRecordValue- Returns:
- id of the checkpoint
-
getCheckpointPosition
public long getCheckpointPosition()- Specified by:
getCheckpointPositionin interfaceCheckpointRecordValue- Returns:
- the position of the checkpoint
-
withCheckpointId
Copy the current immutable object by setting a value for thecheckpointIdattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for checkpointId- Returns:
- A modified copy of the
thisobject
-
withCheckpointPosition
Copy the current immutable object by setting a value for thecheckpointPositionattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for checkpointPosition- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableCheckpointRecordValuethat have equal attribute values. -
hashCode
public int hashCode()Returns a lazily computed hash code from attributes:checkpointId,checkpointPosition. -
toString
Prints the immutable valueCheckpointRecordValuewith attribute values. -
copyOf
Creates an immutable copy of aCheckpointRecordValuevalue. 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 CheckpointRecordValue instance
-
builder
Creates a builder forImmutableCheckpointRecordValue.ImmutableCheckpointRecordValue.builder() .withCheckpointId(long) // optionalcheckpointId.withCheckpointPosition(long) // optionalcheckpointPosition.build();- Returns:
- A new ImmutableCheckpointRecordValue builder
-