Class DiskStorageHistory
java.lang.Object
com.fastasyncworldedit.core.history.changeset.AbstractChangeSet
com.fastasyncworldedit.core.history.changeset.FaweStreamChangeSet
com.fastasyncworldedit.core.history.DiskStorageHistory
- All Implemented Interfaces:
IBatchProcessor
,ChangeSet
,Closeable
,AutoCloseable
- Direct Known Subclasses:
RollbackOptimizedHistory
Store the change on disk
- High disk usage
- Moderate CPU usage
- Minimal memory usage
- Slow
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fastasyncworldedit.core.history.changeset.FaweStreamChangeSet
FaweStreamChangeSet.FaweStreamIdDelegate, FaweStreamChangeSet.FaweStreamPositionDelegate
-
Field Summary
Fields inherited from class com.fastasyncworldedit.core.history.changeset.FaweStreamChangeSet
blockSize, HEADER_SIZE, idDel, posDel
Fields inherited from class com.fastasyncworldedit.core.history.changeset.AbstractChangeSet
closed, waitingAsync, waitingCombined
-
Constructor Summary
ConstructorDescriptionDiskStorageHistory
(World world, UUID uuid) DiskStorageHistory
(World world, UUID uuid, int index) DiskStorageHistory
(File folder, World world, UUID uuid, int i) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close the changeset.void
delete()
Delete the changeset (e.g.void
void
flush()
getBlockOS
(int x, int y, int z) int
int
getIndex()
long
long
getUUID()
boolean
Whether or not the ChangeSet is recording changes.void
void
void
setRecordChanges
(boolean recordChanges) Tell the change set whether to record changes or not.Get a summary of this changeset.void
void
Methods inherited from class com.fastasyncworldedit.core.history.changeset.FaweStreamChangeSet
add, addBiomeChange, addEntityCreate, addEntityRemove, addTileCreate, addTileRemove, backwardIterator, forwardIterator, getBiomeIterator, getBlockIterator, getCompressedOS, getEntityIterator, getFullBlockIterator, getIterator, getIterator, getOriginX, getOriginZ, getTileIterator, isEmpty, readHeader, setOrigin, setupStreamDelegates, size, summarizeShallow, writeHeader
Methods inherited from class com.fastasyncworldedit.core.history.changeset.AbstractChangeSet
add, add, add, add, add, add, add, addWriteTask, addWriteTask, closeAsync, construct, getScope, getWorld, postProcess, postProcessSet, processSet, toEditSession, toEditSession
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.fastasyncworldedit.core.queue.IBatchProcessor
join, joinPost, processGet, remove, trimNBT, trimY
-
Constructor Details
-
DiskStorageHistory
-
DiskStorageHistory
-
DiskStorageHistory
-
-
Method Details
-
delete
public void delete()Description copied from interface:ChangeSet
Delete the changeset (e.g. files on disk, or in a database) -
deleteFiles
public void deleteFiles() -
undo
-
undo
-
redo
-
redo
-
getUUID
-
getBDFile
-
getNbtfFile
-
getNbttFile
-
getEntfFile
-
getEnttFile
-
getBioFile
-
getIndex
public int getIndex() -
flush
public void flush()- Specified by:
flush
in interfaceIBatchProcessor
- Overrides:
flush
in classAbstractChangeSet
-
close
Description copied from interface:ChangeSet
Close the changeset.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceChangeSet
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classAbstractChangeSet
- Throws:
IOException
-
getCompressedSize
public int getCompressedSize()- Specified by:
getCompressedSize
in classFaweStreamChangeSet
-
getSizeInMemory
public long getSizeInMemory()- Specified by:
getSizeInMemory
in classFaweStreamChangeSet
-
getSizeOnDisk
public long getSizeOnDisk()- Overrides:
getSizeOnDisk
in classFaweStreamChangeSet
-
getBlockOS
- Specified by:
getBlockOS
in classFaweStreamChangeSet
- Throws:
IOException
-
getBiomeOS
- Specified by:
getBiomeOS
in classFaweStreamChangeSet
- Throws:
IOException
-
getEntityCreateOS
- Specified by:
getEntityCreateOS
in classFaweStreamChangeSet
- Throws:
IOException
-
getEntityRemoveOS
- Specified by:
getEntityRemoveOS
in classFaweStreamChangeSet
- Throws:
IOException
-
getTileCreateOS
- Specified by:
getTileCreateOS
in classFaweStreamChangeSet
- Throws:
IOException
-
getTileRemoveOS
- Specified by:
getTileRemoveOS
in classFaweStreamChangeSet
- Throws:
IOException
-
getBlockIS
- Specified by:
getBlockIS
in classFaweStreamChangeSet
- Throws:
IOException
-
getBiomeIS
- Specified by:
getBiomeIS
in classFaweStreamChangeSet
- Throws:
IOException
-
getEntityCreateIS
- Specified by:
getEntityCreateIS
in classFaweStreamChangeSet
- Throws:
IOException
-
getEntityRemoveIS
- Specified by:
getEntityRemoveIS
in classFaweStreamChangeSet
- Throws:
IOException
-
getTileCreateIS
- Specified by:
getTileCreateIS
in classFaweStreamChangeSet
- Throws:
IOException
-
getTileRemoveIS
- Specified by:
getTileRemoveIS
in classFaweStreamChangeSet
- Throws:
IOException
-
summarize
Description copied from interface:ChangeSet
Get a summary of this changeset.- Specified by:
summarize
in interfaceChangeSet
- Overrides:
summarize
in classFaweStreamChangeSet
-
readHeader
-
isRecordingChanges
public boolean isRecordingChanges()Description copied from interface:ChangeSet
Whether or not the ChangeSet is recording changes.- Returns:
- whether or not the ChangeSet is set to record changes
-
setRecordChanges
public void setRecordChanges(boolean recordChanges) Description copied from interface:ChangeSet
Tell the change set whether to record changes or not.- Parameters:
recordChanges
- whether to record changes or not
-