Class BatchRead

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

public final class BatchRead extends BatchRecord
Batch key and read only operations with default policy. Used in batch read commands where different bins are needed for each key.
  • Field Details

    • policy

      public final BatchReadPolicy policy
      Optional read policy.
    • binNames

      public final String[] binNames
      Bins to retrieve for this key. binNames are mutually exclusive with ops.
    • ops

      public final Operation[] ops
      Optional operations for this key. ops are mutually exclusive with binNames. A binName can be emulated with Operation.get(String)
    • readAllBins

      public final boolean readAllBins
      If true, ignore binNames and read all bins. If false and binNames are set, read specified binNames. If false and binNames are not set, read record header (generation, expiration) only.
  • Constructor Details

    • BatchRead

      public BatchRead(Key key, String[] binNames)
      Initialize batch key and bins to retrieve.
    • BatchRead

      public BatchRead(Key key, boolean readAllBins)
      Initialize batch key and readAllBins indicator.
    • BatchRead

      public BatchRead(Key key, Operation[] ops)
      Initialize batch key and read operations.
    • BatchRead

      public BatchRead(BatchReadPolicy policy, Key key, String[] binNames)
      Initialize batch policy, key and bins to retrieve.
    • BatchRead

      public BatchRead(BatchReadPolicy policy, Key key, boolean readAllBins)
      Initialize batch policy, key and readAllBins indicator.
    • BatchRead

      public BatchRead(BatchReadPolicy policy, Key key, Operation[] ops)
      Initialize batch policy, key and read operations.
  • 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