Modifier and Type | Field and Description |
---|---|
protected java.time.ZonedDateTime |
date |
protected java.io.File |
file |
protected static org.slf4j.Logger |
logger |
protected java.lang.String |
name |
Constructor and Description |
---|
Snapshot(SnapshotRepository repo,
java.lang.String snapshot)
Construct a snapshot restoration operation.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Snapshot o) |
boolean |
containsWorld(java.lang.String worldname)
Check the zip/tar file it contains the given world.
|
boolean |
equals(java.lang.Object o) |
ChunkStore |
getChunkStore()
Get a chunk store.
|
java.time.ZonedDateTime |
getDate()
Get the date associated with this snapshot.
|
java.io.File |
getFile()
Get the file for the snapshot.
|
java.lang.String |
getName()
Get the snapshot's name.
|
int |
hashCode() |
void |
setDate(java.time.ZonedDateTime date)
Set the date of the snapshot.
|
protected static org.slf4j.Logger logger
protected java.io.File file
protected java.lang.String name
protected java.time.ZonedDateTime date
public Snapshot(SnapshotRepository repo, java.lang.String snapshot)
repo
- a repositorysnapshot
- a snapshot namepublic ChunkStore getChunkStore() throws java.io.IOException, DataException
java.io.IOException
- if there is an error loading the chunk storeDataException
- if there is an error loading the chunk storepublic boolean containsWorld(java.lang.String worldname)
public java.lang.String getName()
public java.io.File getFile()
public java.time.ZonedDateTime getDate()
public void setDate(java.time.ZonedDateTime date)
date
- the date of the snapshotpublic int compareTo(Snapshot o)
compareTo
in interface java.lang.Comparable<Snapshot>
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object