public interface SegmentWriter
Modifier and Type | Method and Description |
---|---|
void |
flush() |
@NotNull RecordId |
writeBlob(@NotNull Blob blob)
Write a blob (as list of block records)
|
default @NotNull RecordId |
writeNode(@NotNull NodeState state)
Write a node state.
|
@NotNull RecordId |
writeNode(@NotNull NodeState state,
@Nullable Buffer stableIdBytes)
Write a node state.
|
@NotNull RecordId |
writeStream(@NotNull java.io.InputStream stream)
Writes a stream value record.
|
void flush() throws java.io.IOException
java.io.IOException
@NotNull @NotNull RecordId writeBlob(@NotNull @NotNull Blob blob) throws java.io.IOException
blob
- blob to writejava.io.IOException
@NotNull @NotNull RecordId writeStream(@NotNull @NotNull java.io.InputStream stream) throws java.io.IOException
stream
- stream to be writtenjava.io.IOException
- if the input stream could not be read or the output
could not be written@NotNull @NotNull RecordId writeNode(@NotNull @NotNull NodeState state, @Nullable @Nullable Buffer stableIdBytes) throws java.io.IOException
stableId
will be assigned to
the persisted node. Otherwise the stable id will be inferred from state
.state
- node state to writestableIdBytes
- the stableId that should be assigned to the node or null
.java.io.IOException
@NotNull default @NotNull RecordId writeNode(@NotNull @NotNull NodeState state) throws java.io.IOException
Equivalent to writeNode(state, null)
java.io.IOException
writeNode(NodeState, Buffer)
Copyright © 2012–2022 The Apache Software Foundation. All rights reserved.