to.etc.webapp.pendingoperations
Class PendingOperationTask
java.lang.Object
to.etc.webapp.pendingoperations.PendingOperationTask
- All Implemented Interfaces:
- java.lang.Runnable, ILogSink
public final class PendingOperationTask
- extends java.lang.Object
- implements java.lang.Runnable, ILogSink
This is a runnable which tries to execute one or more PendingOperations. This only executes multiple
PendingOperations if these operations belong to the same group. In that case it handles group state
transitions in the database with all of the group records locked, to prevent multiserver trouble.
If any of the PendingOperations fails the failed one is marked as such and scheduled for retry; all
others in the group are released without being processed.
- Author:
- Frits Jalvingh
Created on Mar 5, 2009
Method Summary |
void |
exception(java.lang.Throwable t,
java.lang.String msg)
|
void |
log(java.lang.String msg)
|
void |
run()
Loop through all pendingOperations and execute them one by one. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PendingOperationTask
public PendingOperationTask(PendingOperationTaskProvider provider,
java.util.List<PendingOperation> list)
run
public void run()
- Loop through all pendingOperations and execute them one by one. Aborts as soon as an operation fails.
- Specified by:
run
in interface java.lang.Runnable
- See Also:
Runnable.run()
exception
public void exception(java.lang.Throwable t,
java.lang.String msg)
- Specified by:
exception
in interface ILogSink
log
public void log(java.lang.String msg)
- Specified by:
log
in interface ILogSink