Changeset 3140 for trunk/openmole/core/org.openmole.core.workflow.implementation/src/main/java/org/openmole/core/workflow/implementation/mole/execution/SubMoleExecution.java
- Timestamp:
- 03/02/10 18:31:54 (2 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/openmole/core/org.openmole.core.workflow.implementation/src/main/java/org/openmole/core/workflow/implementation/mole/execution/SubMoleExecution.java
r3034 r3140 32 32 } 33 33 34 35 34 public SubMoleExecution(ISubMoleExecution parent) { 36 35 this.parent = parent; 36 } 37 38 public SubMoleExecution(ISubMoleExecution parent, int nbJobInProgress) { 39 this.parent = parent; 40 addNbJobInProgress(nbJobInProgress); 37 41 } 38 42 … … 45 49 public void incNbJobInProgress() { 46 50 nbJobInProgress++; 51 if(!isRoot()) getParent().incNbJobInProgress(); 47 52 } 48 53 … … 50 55 public void decNbJobInProgress() { 51 56 nbJobInProgress--; 57 if(!isRoot()) getParent().decNbJobInProgress(); 52 58 } 53 59 … … 57 63 } 58 64 65 @Override 66 public boolean isRoot() { 67 return this == getParent(); 68 } 69 70 @Override 71 public void addNbJobInProgress(int val) { 72 nbJobInProgress += val; 73 if(!isRoot()) getParent().addNbJobInProgress(val); 74 } 75 59 76 60 77





