Method Summary |
|
public void | execute(BackendWorkerThread backendThread) The task code executed by the backendThread. |
abstract public void | executeTask(BackendWorkerThread backendThread) The implementation specific task code to be executed by backendThread. |
public List | getExceptions() Returns the exceptions lists. |
public synchronized int | getExecutionStarted() Returns the number of threads that have started the execution of the task. |
public int | getFailed() Returns the failed. |
public ResultSet | getGeneratedKeysResultSet() Returns the generatedKeysResultSet value. |
public List | getLocks(DatabaseBackend backend) Returns the locksMap taken by this task for a given backend. |
public int | getNbToComplete() Returns the number of threads that must succeed before returning. |
final public long | getPersistentConnectionId() Returns the persistentConnectionId value. |
abstract public AbstractRequest | getRequest() Return the request associated with this task if any, returns null
otherwise. |
public int | getSuccess() Returns the success. |
public int | getTotalNb() Returns the total number of threads. |
abstract public long | getTransactionId() Returns the transaction identifier of this task if any (isAutoCommit
returns false). |
public synchronized boolean | hasCompleted() Returns true if the task has been sucessfully completed by nbToComplete
nodes (set in the constructor) of if everyone has completed (successfully
or not), false otherwise. |
public synchronized boolean | hasFullyCompleted() Returns true if the task has completed (successfully or not) or false if we
are still expecting answers from some backends. |
abstract public boolean | isAutoCommit() Returns true if this task is in autocommit mode, false if it is in a
transaction. |
final public boolean | isPersistentConnection() Returns the persistentConnection value. |
public synchronized void | notifyCompletion(BackendWorkerThread backendThread) This is used to notify the completion of this task without success or
failure. |
public synchronized boolean | notifyFailure(BackendWorkerThread backendThread, long timeout, Throwable e) Notifies that the specified backendThread failed to execute this task. |
public synchronized void | notifySuccess(BackendWorkerThread backendThread) Notifies the successful completion of this task. |
public synchronized int | notifySuccess(BackendWorkerThread backendThread, int result) Notifies the successful completion of this task and provide the
resultOnFirstBackendToSucceed for checking. |
public synchronized boolean | setExpiredTimeout() Set the flag to tell that the timeout has expired on this task. |
public void | setGeneratedKeysResultSet(ResultSet generatedKeysResultSet) Sets the generatedKeysResultSet value. |
public synchronized void | setLocks(DatabaseBackend backend, List locks) Sets the locksMap taken by this task for a given backend (ignored if the
locksMap were already set once). |
final public void | setPersistentConnection(boolean persistentConnection) Sets the persistentConnection value. |
final public void | setPersistentConnectionId(long persistentConnectionId) Sets the persistentConnectionId value. |
public void | setTotalNb(int totalNb) Sets the total number of threads. |