Class ImmutableResourceDeletionRecordValue
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableResourceDeletionRecordValue
- All Implemented Interfaces:
JsonSerializable,RecordValue,ResourceDeletionRecordValue
@ParametersAreNonnullByDefault
@Immutable
public final class ImmutableResourceDeletionRecordValue
extends Object
implements ResourceDeletionRecordValue
Immutable implementation of
ResourceDeletionRecordValue.
Use the builder to create immutable instances:
ImmutableResourceDeletionRecordValue.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableResourceDeletionRecordValue. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableResourceDeletionRecordValue.copyOf(ResourceDeletionRecordValue instance) Creates an immutable copy of aResourceDeletionRecordValuevalue.booleanThis instance is equal to all instances ofImmutableResourceDeletionRecordValuethat have equal attribute values.longinthashCode()Returns a lazily computed hash code from attributes:resourceKey.toString()Prints the immutable valueResourceDeletionRecordValuewith attribute values.withResourceKey(long value) Copy the current immutable object by setting a value for theresourceKeyattribute.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
-
getResourceKey
public long getResourceKey()- Specified by:
getResourceKeyin interfaceResourceDeletionRecordValue- Returns:
- the key of the resource that will be deleted
-
withResourceKey
Copy the current immutable object by setting a value for theresourceKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for resourceKey- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableResourceDeletionRecordValuethat have equal attribute values. -
hashCode
public int hashCode()Returns a lazily computed hash code from attributes:resourceKey. -
toString
Prints the immutable valueResourceDeletionRecordValuewith attribute values. -
copyOf
Creates an immutable copy of aResourceDeletionRecordValuevalue. 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 ResourceDeletionRecordValue instance
-
builder
Creates a builder forImmutableResourceDeletionRecordValue.ImmutableResourceDeletionRecordValue.builder() .withResourceKey(long) // optionalresourceKey.build();- Returns:
- A new ImmutableResourceDeletionRecordValue builder
-