public abstract class SQLQueueCallable<T>
extends java.lang.Object
implements java.util.concurrent.Callable<T>
Constructor and Description |
---|
SQLQueueCallable() |
Modifier and Type | Method and Description |
---|---|
T |
call() |
abstract T |
call(SQLDatabase db)
Called either within a transaction or not depending on if
SQLDatabaseQueue.submitTransaction(SQLQueueCallable) or
SQLDatabaseQueue.submit(SQLQueueCallable) is called
When called within a transaction, to mark the transaction as successful
simply return from this method, to cause a rollback throw an exception |
public final T call() throws java.lang.Exception
call
in interface java.util.concurrent.Callable<T>
java.lang.Exception
public abstract T call(SQLDatabase db) throws java.lang.Exception
SQLDatabaseQueue.submitTransaction(SQLQueueCallable)
or
SQLDatabaseQueue.submit(SQLQueueCallable)
is called
When called within a transaction, to mark the transaction as successful
simply return from this method, to cause a rollback throw an exceptiondb
- The SQLDatabase for this transactionjava.lang.Exception
- If an error occurred and a rollback is needed