Interface Segment
-
- All Superinterfaces:
BatchWritingStore
,KeyValueStore<org.apache.kafka.common.utils.Bytes,byte[]>
,ReadOnlyKeyValueStore<org.apache.kafka.common.utils.Bytes,byte[]>
,StateStore
public interface Segment extends KeyValueStore<org.apache.kafka.common.utils.Bytes,byte[]>, BatchWritingStore
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description KeyValueIterator<org.apache.kafka.common.utils.Bytes,byte[]>
all()
Return an iterator over all keys in this store.void
destroy()
KeyValueIterator<org.apache.kafka.common.utils.Bytes,byte[]>
range(org.apache.kafka.common.utils.Bytes from, org.apache.kafka.common.utils.Bytes to)
Get an iterator over a given range of keys.-
Methods inherited from interface org.apache.kafka.streams.state.internals.BatchWritingStore
addToBatch, write
-
Methods inherited from interface org.apache.kafka.streams.state.KeyValueStore
delete, put, putAll, putIfAbsent
-
Methods inherited from interface org.apache.kafka.streams.state.ReadOnlyKeyValueStore
approximateNumEntries, get
-
Methods inherited from interface org.apache.kafka.streams.processor.StateStore
close, flush, init, isOpen, name, persistent
-
-
-
-
Method Detail
-
destroy
void destroy() throws IOException
- Throws:
IOException
-
all
KeyValueIterator<org.apache.kafka.common.utils.Bytes,byte[]> all()
Description copied from interface:ReadOnlyKeyValueStore
Return an iterator over all keys in this store. This iterator must be closed after use. The returned iterator must be safe fromConcurrentModificationException
s and must not return null values. No ordering guarantees are provided.- Specified by:
all
in interfaceReadOnlyKeyValueStore<org.apache.kafka.common.utils.Bytes,byte[]>
- Returns:
- An iterator of all key/value pairs in the store.
-
range
KeyValueIterator<org.apache.kafka.common.utils.Bytes,byte[]> range(org.apache.kafka.common.utils.Bytes from, org.apache.kafka.common.utils.Bytes to)
Description copied from interface:ReadOnlyKeyValueStore
Get an iterator over a given range of keys. This iterator must be closed after use. The returned iterator must be safe fromConcurrentModificationException
s and must not return null values. No ordering guarantees are provided.- Specified by:
range
in interfaceReadOnlyKeyValueStore<org.apache.kafka.common.utils.Bytes,byte[]>
- Parameters:
from
- The first key that could be in the rangeto
- The last key that could be in the range- Returns:
- The iterator for this range.
-
-