Class BatchWrite

java.lang.Object
com.aerospike.client.BatchRecord
com.aerospike.client.BatchWrite

public final class BatchWrite extends BatchRecord
Batch key and read/write operations with write policy.
  • Field Details

    • policy

      public final BatchWritePolicy policy
      Optional write policy.
    • ops

      public final Operation[] ops
      Required operations for this key.
  • Constructor Details

    • BatchWrite

      public BatchWrite(Key key, Operation[] ops)
      Initialize batch key and read/write operations.

      Operation.get() is not allowed because it returns a variable number of bins and makes it difficult (sometimes impossible) to lineup operations with results. Instead, use Operation.get(String) for each bin name.

    • BatchWrite

      public BatchWrite(BatchWritePolicy policy, Key key, Operation[] ops)
      Initialize policy, batch key and read/write operations.

      Operation.get() is not allowed because it returns a variable number of bins and makes it difficult (sometimes impossible) to lineup operations with results. Instead, use Operation.get(String) for each bin name.

  • Method Details

    • getType

      public BatchRecord.Type getType()
      Return batch command type.
      Overrides:
      getType in class BatchRecord
    • equals

      public boolean equals(BatchRecord obj)
      Optimized reference equality check to determine batch wire protocol repeat flag. For internal use only.
      Overrides:
      equals in class BatchRecord
    • size

      public int size(Policy parentPolicy)
      Return wire protocol size. For internal use only.
      Overrides:
      size in class BatchRecord