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:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceReceives one entry during a prefix scan. -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(byte[] key) Removes one entry.byte[]get(byte[] key) Reads one entry.voidput(byte[] key, byte[] value) Writes one entry.voidscanPrefix(byte[] prefix, OrderingStore.EntryConsumer consumer) Visits every entry whose key begins withprefix, 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
nullwhen the key is absent
-
put
void put(byte[] key, byte[] value) Writes one entry.- Parameters:
key- the key to writevalue- the bytes to store
-
delete
void delete(byte[] key) Removes one entry.- Parameters:
key- the key to remove
-
scanPrefix
Visits every entry whose key begins withprefix, 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 matchconsumer- invoked once per matching entry
-