public class RocksMap.RocksMapIterator<K,V> extends Object implements Iterator<RocksMap.RocksMapEntry<K,V>>, Closeable
Modifier | Constructor and Description |
---|---|
protected |
RocksMapIterator(RocksMap rocksMap,
K fromKey,
K toKey,
int skipSize,
int size) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
directNext(boolean valid)
只是执行 next 不反序列化数据
|
void |
forEachRemaining(Consumer<? super RocksMap.RocksMapEntry<K,V>> action) |
RocksMap.RocksMapEntry<K,V> |
getEntry()
获取迭代器当前位置的 Entry
|
boolean |
hasNext() |
boolean |
isValid()
迭代器当前位数数据是否有效
|
K |
key()
获取 Key 的值
|
byte[] |
keyBytes()
获取 Key 的值
|
RocksMap.RocksMapEntry<K,V> |
next() |
RocksMap.RocksMapEntry<K,V> |
nextAndValid(boolean valid) |
void |
remove() |
V |
value()
获取 value 的值
|
byte[] |
valueBytes()
获取 value 的值
|
public RocksMap.RocksMapEntry<K,V> getEntry()
public boolean hasNext()
hasNext
in interface Iterator<RocksMap.RocksMapEntry<K,V>>
public boolean isValid()
public K key()
public V value()
public byte[] keyBytes()
public byte[] valueBytes()
public boolean directNext(boolean valid)
valid
- 是否验证当前迭代可用public RocksMap.RocksMapEntry<K,V> nextAndValid(boolean valid)
public RocksMap.RocksMapEntry<K,V> next()
next
in interface Iterator<RocksMap.RocksMapEntry<K,V>>
public void remove()
remove
in interface Iterator<RocksMap.RocksMapEntry<K,V>>
public void forEachRemaining(Consumer<? super RocksMap.RocksMapEntry<K,V>> action)
forEachRemaining
in interface Iterator<RocksMap.RocksMapEntry<K,V>>
public void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2020 Voovan. All rights reserved.