Class RollbackDatabase
java.lang.Object
com.fastasyncworldedit.core.util.task.AsyncNotifyQueue
com.fastasyncworldedit.core.database.RollbackDatabase
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if a connection is open with the database.void
close()
boolean
Closes the connection with the database.Gets the connection with the database.getEdits
(BlockVector3 pos, boolean ascending) getEdits
(UUID uuid, long minTime, BlockVector3 pos1, BlockVector3 pos2, boolean delete, boolean ascending) init()
Future
<?> logEdit
(RollbackOptimizedHistory history) purge
(int diff) Methods inherited from class com.fastasyncworldedit.core.util.task.AsyncNotifyQueue
call, getHandler, isClosed, run, supply
-
Method Details
-
init
-
delete
-
getEdit
-
purge
-
getEdits
-
getEdits
public Iterable<Supplier<RollbackOptimizedHistory>> getEdits(UUID uuid, long minTime, BlockVector3 pos1, BlockVector3 pos2, boolean delete, boolean ascending) -
logEdit
-
getConnection
Gets the connection with the database.- Returns:
- Connection with the database, null if none
-
closeConnection
Closes the connection with the database.- Returns:
- true if successful
- Throws:
SQLException
- if the connection cannot be closed
-
checkConnection
public boolean checkConnection()Checks if a connection is open with the database.- Returns:
- true if the connection is open
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classAsyncNotifyQueue
-