Package io.atomix.raft.snapshot.impl
Class SnapshotChunkImpl
java.lang.Object
io.atomix.raft.snapshot.SbeBufferWriterReader<SnapshotChunkEncoder,SnapshotChunkDecoder>
io.atomix.raft.snapshot.impl.SnapshotChunkImpl
- All Implemented Interfaces:
SnapshotChunk,BufferReader,BufferWriter
public final class SnapshotChunkImpl
extends SbeBufferWriterReader<SnapshotChunkEncoder,SnapshotChunkDecoder>
implements SnapshotChunk
-
Field Summary
Fields inherited from class io.atomix.raft.snapshot.SbeBufferWriterReader
headerDecoder, headerEncoder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SnapshotChunkDecoderprotected SnapshotChunkEncoderlongbyte[]intlongintvoidreset()toString()voidwrap(org.agrona.DirectBuffer buffer, int offset, int length) voidwrite(org.agrona.MutableDirectBuffer buffer, int offset) Methods inherited from class io.atomix.raft.snapshot.SbeBufferWriterReader
toByteBuffer, toBytes, tryWrap, tryWrap, wrap
-
Constructor Details
-
SnapshotChunkImpl
public SnapshotChunkImpl() -
SnapshotChunkImpl
-
-
Method Details
-
getBodyEncoder
- Specified by:
getBodyEncoderin classSbeBufferWriterReader<SnapshotChunkEncoder,SnapshotChunkDecoder>
-
getBodyDecoder
- Specified by:
getBodyDecoderin classSbeBufferWriterReader<SnapshotChunkEncoder,SnapshotChunkDecoder>
-
reset
public void reset()- Overrides:
resetin classSbeBufferWriterReader<SnapshotChunkEncoder,SnapshotChunkDecoder>
-
getLength
public int getLength()- Specified by:
getLengthin interfaceBufferWriter- Overrides:
getLengthin classSbeBufferWriterReader<SnapshotChunkEncoder,SnapshotChunkDecoder>
-
write
public void write(org.agrona.MutableDirectBuffer buffer, int offset) - Specified by:
writein interfaceBufferWriter- Overrides:
writein classSbeBufferWriterReader<SnapshotChunkEncoder,SnapshotChunkDecoder>
-
wrap
public void wrap(org.agrona.DirectBuffer buffer, int offset, int length) - Specified by:
wrapin interfaceBufferReader- Overrides:
wrapin classSbeBufferWriterReader<SnapshotChunkEncoder,SnapshotChunkDecoder>
-
getSnapshotId
- Specified by:
getSnapshotIdin interfaceSnapshotChunk
-
getTotalCount
public int getTotalCount()- Specified by:
getTotalCountin interfaceSnapshotChunk
-
getChunkName
- Specified by:
getChunkNamein interfaceSnapshotChunk
-
getChecksum
public long getChecksum()- Specified by:
getChecksumin interfaceSnapshotChunk
-
getContent
public byte[] getContent()- Specified by:
getContentin interfaceSnapshotChunk
-
getSnapshotChecksum
public long getSnapshotChecksum()- Specified by:
getSnapshotChecksumin interfaceSnapshotChunk
-
toString
-