Class BackupCopyTransaction
java.lang.Object
com.djrapitops.plan.storage.database.transactions.Transaction
com.djrapitops.plan.storage.database.transactions.init.OperationCriticalTransaction
com.djrapitops.plan.storage.database.transactions.patches.Patch
com.djrapitops.plan.storage.database.transactions.commands.RemoveEverythingTransaction
com.djrapitops.plan.storage.database.transactions.BackupCopyTransaction
Transaction that performs a clear + copy operation to duplicate a source database in the current one.
-
Field Summary
Fields inherited from class com.djrapitops.plan.storage.database.transactions.Transaction
attempts, dbType, success
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Implement this method for transaction execution.protected boolean
Override this method for conditional execution.Methods inherited from class com.djrapitops.plan.storage.database.transactions.commands.RemoveEverythingTransaction
applyPatch, hasBeenApplied
Methods inherited from class com.djrapitops.plan.storage.database.transactions.patches.Patch
addColumn, allValuesHaveValueZero, dropForeignKeys, dropTable, ensureNoForeignKeyConstraints, hasColumn, hasTable, isApplied, renameTable, wasApplied
Methods inherited from class com.djrapitops.plan.storage.database.transactions.init.OperationCriticalTransaction
executeTransaction
Methods inherited from class com.djrapitops.plan.storage.database.transactions.Transaction
dbIsNotUnderHeavyLoad, execute, execute, executeOther, executeReturningId, executeSwallowingExceptions, getDBState, getServerUUID, query, toString, wasSuccessful
-
Constructor Details
-
BackupCopyTransaction
-
-
Method Details
-
shouldBeExecuted
protected boolean shouldBeExecuted()Description copied from class:Transaction
Override this method for conditional execution.Please note that the transaction has not been initialized and class variables are not available for queries. The condition should depend on other variables (Like the data that is to be stored) given to the transaction.
- Overrides:
shouldBeExecuted
in classPatch
- Returns:
- false if the transaction should not execute.
-
performOperations
protected void performOperations()Description copied from class:Transaction
Implement this method for transaction execution.- Overrides:
performOperations
in classPatch
-