public class LevelDbOutputWriter extends ForwardingOutputWriter<ByteBuffer>
LevelDbInputReader.
If you want to read about the format spec it is here:
"https://github.com/google/leveldb/"
This implementation deviates from the specification above, in that it allows blocks to be zero
padded regardless of how much data is in the block, rather than only if the block is within 6
bytes of full.| Constructor and Description |
|---|
LevelDbOutputWriter(OutputWriter<ByteBuffer> delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
beginSlice()
Prepares the writer for writing after possibly having gone through
serialization or deserialization.
|
void |
endShard()
Closes the OutputChannel.
|
void |
endSlice()
Prepares the writer for possible serialization.
|
protected OutputWriter<ByteBuffer> |
getDelegate() |
protected int |
getNumBlocksWritten() |
void |
write(ByteBuffer data)
Writes a value to the output.
|
allowSliceRetry, beginShard, estimateMemoryRequirement, getContext, setContextcleanup, close, openpublic LevelDbOutputWriter(OutputWriter<ByteBuffer> delegate)
public void beginSlice()
throws IOException
OutputWriterbeginSlice in class ForwardingOutputWriter<ByteBuffer>IOException - in the event of failurepublic void endSlice()
throws IOException
OutputWriterendSlice in class ForwardingOutputWriter<ByteBuffer>IOException - in the event of failurepublic void write(ByteBuffer data) throws IOException
OutputWriterwrite in class OutputWriter<ByteBuffer>IOExceptionpublic void endShard()
throws IOException
endShard in class ForwardingOutputWriter<ByteBuffer>IOExceptionprotected OutputWriter<ByteBuffer> getDelegate()
getDelegate in class ForwardingOutputWriter<ByteBuffer>protected int getNumBlocksWritten()
Copyright © 2015 Google. All rights reserved.