Class FileSystemSnapshotDatabase
java.lang.Object
com.sk89q.worldedit.world.snapshot.experimental.fs.FileSystemSnapshotDatabase
- All Implemented Interfaces:
SnapshotDatabase
Implements a snapshot database based on a filesystem.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic URI
getRoot()
Get the URI scheme handled by this database.getSnapshot
(URI name) Get a snapshot by name.getSnapshots
(String worldName) Get all snapshots by world, unsorted.static FileSystemSnapshotDatabase
maybeCreate
(Path root, ArchiveNioSupport archiveNioSupport) static ZonedDateTime
tryParseDate
(Path path) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.sk89q.worldedit.world.snapshot.experimental.SnapshotDatabase
getSnapshotsAfter, getSnapshotsBefore, getSnapshotsNewestFirst, getSnapshotsOldestFirst
-
Constructor Details
-
FileSystemSnapshotDatabase
-
-
Method Details
-
tryParseDate
-
createUri
-
maybeCreate
public static FileSystemSnapshotDatabase maybeCreate(Path root, ArchiveNioSupport archiveNioSupport) throws IOException - Throws:
IOException
-
getRoot
-
getScheme
Description copied from interface:SnapshotDatabase
Get the URI scheme handled by this database.- Specified by:
getScheme
in interfaceSnapshotDatabase
-
getSnapshot
Description copied from interface:SnapshotDatabase
Get a snapshot by name.- Specified by:
getSnapshot
in interfaceSnapshotDatabase
- Parameters:
name
- the name of the snapshot- Returns:
- the snapshot if available
- Throws:
IOException
-
getSnapshots
Description copied from interface:SnapshotDatabase
Get all snapshots by world, unsorted. The stream should be closed, as it may allocate filesystem or network resources.- Specified by:
getSnapshots
in interfaceSnapshotDatabase
- Parameters:
worldName
- the name of the world- Returns:
- a stream of all snapshots for the given world in this database
- Throws:
IOException
-