public class FileSnapshotInputStream extends Object implements org.gridgain.grid.internal.processors.cache.database.snapshot.SnapshotInputStream
Modifier and Type | Method and Description |
---|---|
void |
close() |
String |
consistentId() |
static @Nullable org.gridgain.grid.internal.processors.cache.database.snapshot.SnapshotInputStream |
of(@Nullable File file,
int partId,
int pageSize,
String consistentId) |
static @Nullable org.gridgain.grid.internal.processors.cache.database.snapshot.SnapshotInputStream |
of(@Nullable org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPath file,
int partId,
int pageSize,
String consistentId) |
static @Nullable org.gridgain.grid.internal.processors.cache.database.snapshot.SnapshotInputStream |
of(@Nullable org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPath file,
int partId,
int pageSize,
String consistentId,
boolean initWALFileInput,
@Nullable org.apache.ignite.internal.processors.cache.persistence.wal.serializer.RecordSerializerFactory recordSerializerFactory) |
int |
partId() |
boolean |
readNextPage(ByteBuffer buf)
Reads data from stream and writes it into the provided buffer.
|
org.apache.ignite.internal.pagemem.wal.record.WALRecord |
readNextRecord()
Reads next WAL record from stream.
|
protected boolean |
terminationPageReached()
Whether termination page was reached while reading pages stream.
|
String |
toString() |
public int partId()
partId
in interface org.gridgain.grid.internal.processors.cache.database.snapshot.SnapshotInputStream
public String consistentId()
consistentId
in interface org.gridgain.grid.internal.processors.cache.database.snapshot.SnapshotInputStream
public boolean readNextPage(ByteBuffer buf) throws IOException
readNextPage
in interface org.gridgain.grid.internal.processors.cache.database.snapshot.SnapshotInputStream
buf
- Byte buffer.IOException
- If failed.public org.apache.ignite.internal.pagemem.wal.record.WALRecord readNextRecord()
readNextRecord
in interface org.gridgain.grid.internal.processors.cache.database.snapshot.SnapshotInputStream
null
if there are no records remaining.public void close() throws IgniteCheckedException
close
in interface AutoCloseable
IgniteCheckedException
@Nullable public static @Nullable org.gridgain.grid.internal.processors.cache.database.snapshot.SnapshotInputStream of(@Nullable @Nullable org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPath file, int partId, int pageSize, String consistentId, boolean initWALFileInput, @Nullable @Nullable org.apache.ignite.internal.processors.cache.persistence.wal.serializer.RecordSerializerFactory recordSerializerFactory)
file
- Expected file either in uncompressed or compressed format.partId
- Partition ID.pageSize
- Page size.consistentId
- Consistent ID.initWALFileInput
- Whether to init WAL file input. It causes additional memory usage.recordSerializerFactory
- Record serializer factory, that is used to read WAL records from
snapshot input stream.@Nullable public static @Nullable org.gridgain.grid.internal.processors.cache.database.snapshot.SnapshotInputStream of(@Nullable @Nullable org.gridgain.grid.internal.processors.cache.database.snapshot.file.SnapshotPath file, int partId, int pageSize, String consistentId)
file
- Expected file either in uncompressed or compressed format.partId
- Partition ID.pageSize
- Page size.consistentId
- Consistent ID.@Nullable public static @Nullable org.gridgain.grid.internal.processors.cache.database.snapshot.SnapshotInputStream of(@Nullable @Nullable File file, int partId, int pageSize, String consistentId)
file
- Expected file either in uncompressed or compressed format.partId
- Partition ID.pageSize
- Page size.consistentId
- Consistent ID.protected boolean terminationPageReached()
GridGain In-Memory Computing Platform : ver. 8.9.4 Release Date : April 16 2024