Package io.activej.state
Interface StateManager<T,R extends Comparable<R>>
- All Known Implementing Classes:
FileStateManager
public interface StateManager<T,R extends Comparable<R>>
-
Method Summary
Modifier and TypeMethodDescriptiongetLastDiffRevision(R currentRevision) loadSnapshot(R revision) voidvoidsaveSnapshot(T state, R revision) tryLoadDiff(T state, R revisionFrom, R revisionTo) tryLoadSnapshot(R revision)
-
Method Details
-
newRevision
- Throws:
IOException
-
getLastSnapshotRevision
- Throws:
IOException
-
getLastDiffRevision
- Throws:
IOException
-
loadSnapshot
- Throws:
IOException
-
tryLoadSnapshot
- Throws:
IOException
-
loadDiff
@NotNull T loadDiff(@NotNull T state, @NotNull R revisionFrom, @NotNull R revisionTo) throws IOException - Throws:
IOException
-
tryLoadDiff
@Nullable T tryLoadDiff(@NotNull T state, @NotNull R revisionFrom, @NotNull R revisionTo) throws IOException - Throws:
IOException
-
saveSnapshot
- Throws:
IOException
-
saveDiff
void saveDiff(@NotNull T state, @NotNull R revision, @NotNull T stateFrom, @NotNull R revisionFrom) throws IOException - Throws:
IOException
-