public abstract class BlockObjectWriter
extends Object
This interface does not support concurrent writes. Also, once the writer has been opened, it cannot be reopened again.
Constructor and Description |
---|
BlockObjectWriter(BlockId blockId) |
Modifier and Type | Method and Description |
---|---|
BlockId |
blockId() |
abstract void |
close() |
abstract void |
commitAndClose()
Flush the partial writes and commit them as a single atomic block.
|
abstract FileSegment |
fileSegment()
Returns the file segment of committed data that this Writer has written.
|
abstract boolean |
isOpen() |
abstract BlockObjectWriter |
open() |
abstract void |
revertPartialWritesAndClose()
Reverts writes that haven't been flushed yet.
|
abstract void |
write(Object value)
Writes an object.
|
public BlockObjectWriter(BlockId blockId)
public BlockId blockId()
public abstract BlockObjectWriter open()
public abstract void close()
public abstract boolean isOpen()
public abstract void commitAndClose()
public abstract void revertPartialWritesAndClose()
public abstract void write(Object value)
public abstract FileSegment fileSegment()