1 package org.sapia.taskman; 2 3 import org.sapia.taskman.transaction.Transaction; 4 5 45 public class NullTaskManager extends TaskManager { 46 49 protected synchronized void addTaskDescriptor(TaskDescriptor desc) { 50 super.addTaskDescriptor(desc); 51 run(); 52 } 53 54 57 public void run() { 58 TaskmanTransaction current; 59 for(int i = 0; i < _transactions.size(); i++) { 60 current = (TaskmanTransaction) _transactions.get(i); 61 62 if(current.getStatus() == Transaction.STATUS_COMMITTED) { 63 _transactions.remove(i--); 64 } else if(current.getStatus() == Transaction.STATUS_INITIAL) { 65 } else { 67 current.execute(); 68 } 69 } 70 } 71 } 72 | Popular Tags |