public class FileSystemSnapshotDatabase extends java.lang.Object implements SnapshotDatabase
Constructor and Description |
---|
FileSystemSnapshotDatabase(java.nio.file.Path root,
ArchiveNioSupport archiveNioSupport) |
Modifier and Type | Method and Description |
---|---|
static java.net.URI |
createUri(java.lang.String name) |
java.nio.file.Path |
getRoot() |
java.lang.String |
getScheme()
Get the URI scheme handled by this database.
|
java.util.Optional<Snapshot> |
getSnapshot(java.net.URI name)
Get a snapshot by name.
|
java.util.stream.Stream<Snapshot> |
getSnapshots(java.lang.String worldName)
Get all snapshots by world, unsorted.
|
static FileSystemSnapshotDatabase |
maybeCreate(java.nio.file.Path root,
ArchiveNioSupport archiveNioSupport) |
static java.time.ZonedDateTime |
tryParseDate(java.nio.file.Path path) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSnapshotsAfter, getSnapshotsBefore, getSnapshotsNewestFirst, getSnapshotsOldestFirst
public FileSystemSnapshotDatabase(java.nio.file.Path root, ArchiveNioSupport archiveNioSupport)
public static java.time.ZonedDateTime tryParseDate(java.nio.file.Path path)
public static java.net.URI createUri(java.lang.String name)
public static FileSystemSnapshotDatabase maybeCreate(java.nio.file.Path root, ArchiveNioSupport archiveNioSupport) throws java.io.IOException
java.io.IOException
public java.nio.file.Path getRoot()
public java.lang.String getScheme()
SnapshotDatabase
getScheme
in interface SnapshotDatabase
public java.util.Optional<Snapshot> getSnapshot(java.net.URI name) throws java.io.IOException
SnapshotDatabase
getSnapshot
in interface SnapshotDatabase
name
- the name of the snapshotjava.io.IOException
public java.util.stream.Stream<Snapshot> getSnapshots(java.lang.String worldName) throws java.io.IOException
SnapshotDatabase
getSnapshots
in interface SnapshotDatabase
worldName
- the name of the worldjava.io.IOException