public class SnapshotDirStateMachineStorage extends Object implements org.apache.ratis.statemachine.StateMachineStorage
Constructor and Description |
---|
SnapshotDirStateMachineStorage() |
Modifier and Type | Method and Description |
---|---|
void |
cleanupOldSnapshots(org.apache.ratis.statemachine.SnapshotRetentionPolicy retentionPolicy) |
void |
format() |
org.apache.ratis.statemachine.SnapshotInfo |
getLatestSnapshot() |
File |
getSnapshotDir() |
File |
getTmpDir() |
void |
init(org.apache.ratis.server.storage.RaftStorage raftStorage) |
void |
loadLatestSnapshot()
Loads the latest snapshot information into the StateMachineStorage.
|
static Matcher |
matchSnapshotPath(Path path) |
void |
signalNewSnapshot()
Signal to the StateMachineStorage that a new snapshot was taken.
|
public static Matcher matchSnapshotPath(Path path)
path
- to evaluatepublic void init(org.apache.ratis.server.storage.RaftStorage raftStorage) throws IOException
init
in interface org.apache.ratis.statemachine.StateMachineStorage
IOException
public void loadLatestSnapshot()
@Nullable public org.apache.ratis.statemachine.SnapshotInfo getLatestSnapshot()
getLatestSnapshot
in interface org.apache.ratis.statemachine.StateMachineStorage
public void format() throws IOException
format
in interface org.apache.ratis.statemachine.StateMachineStorage
IOException
public void signalNewSnapshot()
public void cleanupOldSnapshots(org.apache.ratis.statemachine.SnapshotRetentionPolicy retentionPolicy) throws IOException
cleanupOldSnapshots
in interface org.apache.ratis.statemachine.StateMachineStorage
IOException
public File getSnapshotDir()
public File getTmpDir()
Copyright © 2023. All Rights Reserved.