public abstract class BaseBinaryStateIterator<K,V> extends BaseStateIterator<K,V,byte[],byte[]>
KeyValueState
which encoded types of key and value are both binary type.Constructor and Description |
---|
BaseBinaryStateIterator(Iterator<Map.Entry<byte[],byte[]>> pendingPrepareIterator,
Iterator<Map.Entry<byte[],byte[]>> pendingCommitIterator)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract K |
decodeKey(byte[] key)
Decode key to convert byte array to state key type.
|
protected abstract V |
decodeValue(byte[] value)
Decode value to convert byte array to state value type.
|
protected abstract boolean |
isEndOfDataFromStorage()
Check whether end of data is reached from storage state KVs.
|
protected abstract boolean |
isTombstoneValue(byte[] value)
Check whether the value is tombstone (deletion mark) value.
|
protected abstract Iterator<Map.Entry<byte[],byte[]>> |
loadChunkFromStateStorage()
Load some part of state KVs from storage and returns iterator of cached data from storage.
|
hasNext, next, remove
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public BaseBinaryStateIterator(Iterator<Map.Entry<byte[],byte[]>> pendingPrepareIterator, Iterator<Map.Entry<byte[],byte[]>> pendingCommitIterator)
pendingPrepareIterator
- The iterator of pendingPreparependingCommitIterator
- The iterator of pendingCommitprotected abstract Iterator<Map.Entry<byte[],byte[]>> loadChunkFromStateStorage()
loadChunkFromStateStorage
in class BaseStateIterator<K,V,byte[],byte[]>
protected abstract boolean isEndOfDataFromStorage()
isEndOfDataFromStorage
in class BaseStateIterator<K,V,byte[],byte[]>
protected abstract K decodeKey(byte[] key)
decodeKey
in class BaseStateIterator<K,V,byte[],byte[]>
key
- byte array encoded keyprotected abstract V decodeValue(byte[] value)
decodeValue
in class BaseStateIterator<K,V,byte[],byte[]>
value
- byte array encoded valueprotected abstract boolean isTombstoneValue(byte[] value)
isTombstoneValue
in class BaseStateIterator<K,V,byte[],byte[]>
value
- the value to checkCopyright © 2023 The Apache Software Foundation. All rights reserved.