Interface OrderingStore


public interface OrderingStore
The byte-level key-value store holding a process's ordering state.

This is the engine's only route to durable storage, and the seam a host implements. It names no host type, so the engine can be driven by a simulator as readily as by Kafka Streams.

Writes are expected to commit atomically with the step that made them.

See Also:
  • StoreCodec
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Receives one entry during a prefix scan.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    delete(byte[] key)
    Removes one entry.
    byte[]
    get(byte[] key)
    Reads one entry.
    void
    put(byte[] key, byte[] value)
    Writes one entry.
    void
    scanPrefix(byte[] prefix, OrderingStore.EntryConsumer consumer)
    Visits every entry whose key begins with prefix, in unsigned lexicographic key order.
  • Method Details

    • get

      byte[] get(byte[] key)
      Reads one entry.
      Parameters:
      key - the key to read
      Returns:
      the stored bytes, or null when the key is absent
    • put

      void put(byte[] key, byte[] value)
      Writes one entry.
      Parameters:
      key - the key to write
      value - the bytes to store
    • delete

      void delete(byte[] key)
      Removes one entry.
      Parameters:
      key - the key to remove
    • scanPrefix

      void scanPrefix(byte[] prefix, OrderingStore.EntryConsumer consumer)
      Visits every entry whose key begins with prefix, in unsigned lexicographic key order.

      The order is load-bearing: held-message keys place the position after the channel, so an in-order scan yields each channel's hold-back buffer oldest first, and restore depends on that. The engine verifies per-channel position order during restore and refuses state visited out of order.

      Parameters:
      prefix - the key prefix to match
      consumer - invoked once per matching entry