public class LocalSnapshotMetaTable extends Object
| 构造器和说明 |
|---|
LocalSnapshotMetaTable(RaftOptions raftOptions) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
addFile(String fileName,
LocalFileMetaOutter.LocalFileMeta meta)
Adds a file metadata.
|
LocalFileMetaOutter.LocalFileMeta |
getFileMeta(String fileName)
Get the file metadata by fileName, returns null when not found.
|
RaftOutter.SnapshotMeta |
getMeta()
Returns the snapshot metadata.
|
boolean |
hasMeta()
Returns true when has the snapshot metadata.
|
Set<String> |
listFiles()
Get all fileNames in this table.
|
boolean |
loadFromFile(String path)
Load metadata infos from a file by path.
|
boolean |
loadFromIoBufferAsRemote(ByteBuffer buf)
Load metadata infos from byte buffer.
|
boolean |
removeFile(String fileName)
Removes a file metadata.
|
ByteBuffer |
saveToByteBufferAsRemote()
Save metadata infos into byte buffer.
|
boolean |
saveToFile(String path)
Save metadata infos into file by path.
|
void |
setMeta(RaftOutter.SnapshotMeta meta)
Set the snapshot metadata.
|
public LocalSnapshotMetaTable(RaftOptions raftOptions)
public ByteBuffer saveToByteBufferAsRemote()
public boolean loadFromIoBufferAsRemote(ByteBuffer buf)
public boolean addFile(String fileName, LocalFileMetaOutter.LocalFileMeta meta)
public boolean removeFile(String fileName)
public boolean saveToFile(String path) throws IOException
IOExceptionpublic boolean hasMeta()
public LocalFileMetaOutter.LocalFileMeta getFileMeta(String fileName)
public void setMeta(RaftOutter.SnapshotMeta meta)
public RaftOutter.SnapshotMeta getMeta()
public boolean loadFromFile(String path) throws IOException
IOExceptionCopyright © 2021. All rights reserved.