public class LocalSnapshotReader extends SnapshotReader
JRAFT_SNAPSHOT_META_FILE, JRAFT_SNAPSHOT_PREFIX, REMOTE_SNAPSHOT_URI_SCHEME| 构造器和说明 |
|---|
LocalSnapshotReader(LocalSnapshotStorage snapshotStorage,
SnapshotThrottle snapshotThrottle,
Endpoint addr,
RaftOptions raftOptions,
String path) |
| 限定符和类型 | 方法和说明 |
|---|---|
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 在类中 SnapshotReaderpublic String generateURIForCopy()
SnapshotReadergenerateURIForCopy 在类中 SnapshotReaderpublic Set<String> listFiles()
Snapshotpublic com.google.protobuf.Message getFileMeta(String fileName)
SnapshotgetFileMeta 在类中 SnapshotCopyright © 2021. All rights reserved.