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,
boolean optimizedCompressedEncryption) |
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 optimizedCompressedEncryption) |
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 optimizedCompressedEncryption)
file
- Expected file either in uncompressed or compressed format.partId
- Partition ID.pageSize
- Page size.consistentId
- Consistent ID.optimizedCompressedEncryption
- Optimized compressed encryption flag.@Nullable public static @Nullable org.gridgain.grid.internal.processors.cache.database.snapshot.SnapshotInputStream of(@Nullable @Nullable File file, int partId, int pageSize, String consistentId, boolean optimizedCompressedEncryption)
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.15 Release Date : December 3 2024