|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@InterfaceAudience.Private @InterfaceStability.Unstable public interface Decoder
An interface for iterating through a sequence of KeyValues. Similar to Java's Iterator, but without the hasNext() or remove() methods. The hasNext() method is problematic because it may require actually loading the next object, which in turn requires storing the previous object somewhere.
The core data block decoder should be as fast as possible, so we push the complexity and
performance expense of concurrently tracking multiple cells to layers above the Decoder
.
The current()
method will return a reference to a the decodable type.
while (scanner.next()) { KeyValue kv = scanner.get(); // do something }
Method Summary | |
---|---|
boolean |
advance()
Advance the scanner 1 object |
KeyValue |
current()
|
Method Detail |
---|
KeyValue current()
boolean advance() throws IOException
current()
will return a valid object
IOException
- if there is an error reading the next entry
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |