public class LocalSnapshotReader extends SnapshotReader
JRAFT_SNAPSHOT_META_FILE, JRAFT_SNAPSHOT_PREFIX, REMOTE_SNAPSHOT_URI_SCHEME| Constructor and Description |
|---|
LocalSnapshotReader(LocalSnapshotStorage snapshotStorage,
SnapshotThrottle snapshotThrottle,
Endpoint addr,
RaftOptions raftOptions,
String path) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
String |
generateURIForCopy()
Generate uri for other peers to copy this snapshot.
|
com.google.protobuf.Message |
getFileMeta(String fileName)
Get file meta by fileName.
|
String |
getPath()
Get the path of the Snapshot
|
boolean |
init(Void v)
Initialize the service.
|
Set<String> |
listFiles()
List all the existing files in the Snapshot currently
|
RaftOutter.SnapshotMeta |
load()
Load the snapshot metadata.
|
void |
shutdown()
Dispose the resources for service.
|
copy, equals, getCode, getErrorMsg, getRaftError, hashCode, isOk, OK, reset, setCode, setError, setError, setErrorMsg, toStringpublic LocalSnapshotReader(LocalSnapshotStorage snapshotStorage, SnapshotThrottle snapshotThrottle, Endpoint addr, RaftOptions raftOptions, String path)
public void close()
throws IOException
IOExceptionpublic boolean init(Void v)
Lifecyclepublic void shutdown()
Lifecyclepublic RaftOutter.SnapshotMeta load()
SnapshotReaderload in class SnapshotReaderpublic String generateURIForCopy()
SnapshotReadergenerateURIForCopy in class SnapshotReaderpublic String getPath()
Snapshotpublic Set<String> listFiles()
Snapshotpublic com.google.protobuf.Message getFileMeta(String fileName)
SnapshotgetFileMeta in class SnapshotCopyright © 2024. All rights reserved.