Class DBAccessLock
java.lang.Object
com.djrapitops.plan.storage.database.DBAccessLock
Database Lock that prevents queries and transactions from taking place before database schema is ready.
- OperationCriticalTransactions pass through the Access lock without blocking to allow the initial transactions. - Queries inside Transactions skip access log to allow OperationCriticalTransactions perform queries.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
<T,
E extends Exception>
TperformDatabaseOperation
(ThrowingSupplier<T, E> operation) <T,
E extends Exception>
TperformDatabaseOperation
(ThrowingSupplier<T, E> operation, Transaction transaction) <E extends Exception>
voidperformDatabaseOperation
(ThrowingVoidFunction<E> operation) <E extends Exception>
voidperformDatabaseOperation
(ThrowingVoidFunction<E> operation, Transaction transaction)
-
Constructor Details
-
DBAccessLock
-
-
Method Details
-
operabilityChanged
public void operabilityChanged() -
performDatabaseOperation
public <E extends Exception> void performDatabaseOperation(ThrowingVoidFunction<E> operation) throws E - Throws:
E extends Exception
-
performDatabaseOperation
public <E extends Exception> void performDatabaseOperation(ThrowingVoidFunction<E> operation, Transaction transaction) throws E - Throws:
E extends Exception
-
performDatabaseOperation
public <T,E extends Exception> T performDatabaseOperation(ThrowingSupplier<T, E> operation) throws E- Throws:
E extends Exception
-
performDatabaseOperation
public <T,E extends Exception> T performDatabaseOperation(ThrowingSupplier<T, E> operation, Transaction transaction) throws E- Throws:
E extends Exception
-