Class ImmutableProcessInstanceBatchRecordValue

java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableProcessInstanceBatchRecordValue
All Implemented Interfaces:
JsonSerializable, RecordValue, ProcessInstanceBatchRecordValue, ProcessInstanceRelated, TenantOwned

public final class ImmutableProcessInstanceBatchRecordValue extends Object implements ProcessInstanceBatchRecordValue
Immutable implementation of ProcessInstanceBatchRecordValue.

Use the builder to create immutable instances: ImmutableProcessInstanceBatchRecordValue.builder().

  • Method Details

    • getProcessInstanceKey

      public long getProcessInstanceKey()
      Specified by:
      getProcessInstanceKey in interface ProcessInstanceRelated
      Returns:
      the key of the corresponding process instance
    • getTenantId

      public String getTenantId()
      Returns the identifier of the tenant that owns this entity.
      Specified by:
      getTenantId in interface TenantOwned
    • getBatchElementInstanceKey

      public long getBatchElementInstanceKey()
      Specified by:
      getBatchElementInstanceKey in interface ProcessInstanceBatchRecordValue
      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:
      getIndex in interface ProcessInstanceBatchRecordValue
      Returns:
      an index used to keep track of where we are in our batch process and where to start the next batch.
    • withProcessInstanceKey

      public final ImmutableProcessInstanceBatchRecordValue withProcessInstanceKey(long value)
      Copy the current immutable object by setting a value for the processInstanceKey attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for processInstanceKey
      Returns:
      A modified copy of the this object
    • withTenantId

      public final ImmutableProcessInstanceBatchRecordValue withTenantId(String value)
      Copy the current immutable object by setting a value for the tenantId attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for tenantId (can be null)
      Returns:
      A modified copy of the this object
    • withBatchElementInstanceKey

      public final ImmutableProcessInstanceBatchRecordValue withBatchElementInstanceKey(long value)
      Copy the current immutable object by setting a value for the batchElementInstanceKey attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for batchElementInstanceKey
      Returns:
      A modified copy of the this object
    • withIndex

      public final ImmutableProcessInstanceBatchRecordValue withIndex(long value)
      Copy the current immutable object by setting a value for the index attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for index
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of ImmutableProcessInstanceBatchRecordValue that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Returns a lazily computed hash code from attributes: processInstanceKey, tenantId, batchElementInstanceKey, index.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value ProcessInstanceBatchRecordValue with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      Creates an immutable copy of a ProcessInstanceBatchRecordValue value. 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 for ImmutableProcessInstanceBatchRecordValue.
       ImmutableProcessInstanceBatchRecordValue.builder()
          .withProcessInstanceKey(long) // optional processInstanceKey
          .withTenantId(String | null) // nullable tenantId
          .withBatchElementInstanceKey(long) // optional batchElementInstanceKey
          .withIndex(long) // optional index
          .build();
       
      Returns:
      A new ImmutableProcessInstanceBatchRecordValue builder