Interface SnapshotDatabase
- All Known Implementing Classes:
FileSystemSnapshotDatabase
public interface SnapshotDatabase
Handler for querying snapshot storage.
-
Method Summary
Modifier and TypeMethodDescriptionGet the URI scheme handled by this database.getSnapshot(URI name)
Get a snapshot by name.getSnapshots(String worldName)
Get all snapshots by world, unsorted.getSnapshotsAfter(String worldName, ZonedDateTime date)
getSnapshotsBefore(String worldName, ZonedDateTime date)
getSnapshotsNewestFirst(String worldName)
getSnapshotsOldestFirst(String worldName)
-
Method Details
-
getScheme
String getScheme()Get the URI scheme handled by this database. -
getSnapshot
Get a snapshot by name.- Parameters:
name
- the name of the snapshot- Returns:
- the snapshot if available
- Throws:
IOException
-
getSnapshots
Get all snapshots by world, unsorted. The stream should be closed, as it may allocate filesystem or network resources.- Parameters:
worldName
- the name of the world- Returns:
- a stream of all snapshots for the given world in this database
- Throws:
IOException
-
getSnapshotsNewestFirst
- Throws:
IOException
-
getSnapshotsOldestFirst
- Throws:
IOException
-
getSnapshotsBefore
default Stream<Snapshot> getSnapshotsBefore(String worldName, ZonedDateTime date) throws IOException- Throws:
IOException
-
getSnapshotsAfter
default Stream<Snapshot> getSnapshotsAfter(String worldName, ZonedDateTime date) throws IOException- Throws:
IOException
-