Interface Mutations

All Known Implementing Classes:
Writes

public interface Mutations
Represents a set of mutations that can be applied to a KVStore.

Each mutation is either a key/value put, the removal of a key range (possibly containing only a single key), or a counter adjustment. Mutations are expected to be applied in the order: removes, puts, adjusts. Therefore, if the same key is mutated in multiple ways, adjusts should occur after puts, and puts should occur after removes.

  • Method Details

    • getRemoveRanges

      Stream<KeyRange> getRemoveRanges()
      Get the key ranges removals contained by this instance.
      Returns:
      key ranges removed
    • getPutPairs

      Stream<Map.Entry<byte[],byte[]>> getPutPairs()
      Get the written key/value pairs contained by this instance.

      The caller must not modify any of the returned byte[] arrays.

      Returns:
      mapping from key to corresponding value
    • getAdjustPairs

      Stream<Map.Entry<byte[],Long>> getAdjustPairs()
      Get the counter adjustments contained by this instance.

      The caller must not modify any of the returned byte[] arrays.

      Returns:
      mapping from key to corresponding counter adjustment