Changeset 3140
- Timestamp:
- 03/02/10 18:31:54 (2 years ago)
- Location:
- trunk/openmole
- Files:
-
- 7 modified
-
core/org.openmole.core.workflow.implementation/src/main/java/org/openmole/core/workflow/implementation/mole/execution/MoleExecution.java (modified) (1 diff)
-
core/org.openmole.core.workflow.implementation/src/main/java/org/openmole/core/workflow/implementation/mole/execution/SubMoleExecution.java (modified) (4 diffs)
-
core/org.openmole.core.workflow.implementation/src/main/java/org/openmole/core/workflow/implementation/transition/AggregationTransition.java (modified) (2 diffs)
-
core/org.openmole.core.workflow.implementation/src/main/java/org/openmole/core/workflow/implementation/transition/ExplorationTransition.java (modified) (2 diffs)
-
core/org.openmole.core.workflow.model/src/main/java/org/openmole/core/workflow/model/execution/batch/IMoleJobCategory.java (modified) (1 diff)
-
core/org.openmole.core.workflow.model/src/main/java/org/openmole/core/workflow/model/mole/execution/ISubMoleExecution.java (modified) (1 diff)
-
plugins/org.openmole.plugin.molejobgroupingstrategy.onfactor/src/main/java/org/openmole/plugin/molejobgroupingstrategy/onfactor/FactorCategory.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/openmole/core/org.openmole.core.workflow.implementation/src/main/java/org/openmole/core/workflow/implementation/mole/execution/MoleExecution.java
r3138 r3140 20 20 import java.util.Collection; 21 21 import java.util.Collections; 22 import java.util.HashMap;23 22 import java.util.Map; 24 23 import java.util.TreeMap; -
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 -
trunk/openmole/core/org.openmole.core.workflow.implementation/src/main/java/org/openmole/core/workflow/implementation/transition/AggregationTransition.java
r3134 r3140 23 23 import java.util.List; 24 24 import java.util.Set; 25 import java.util.logging.Level; 26 import java.util.logging.Logger; 25 27 26 28 import org.openmole.misc.exception.InternalProcessingError; … … 65 67 resultContext = new Context(); 66 68 registry.register(this, resultContext, ticket.getParent()); 69 //Logger.getLogger(AggregationTransition.class.getName()).log(Level.INFO, "Registring listner for " + getStart().getAssignedTask().getName() + " -> " + getEnd().getAssignedTask().getName() + " submole " + subMole + " parent " + subMole.getParent() + ": "+ subMole.getNbJobInProgess()); 67 70 Activator.getEventDispatcher().registerListener(subMole, Priority.LOW.getValue(), new AggregationTransitionAdapter(this), ISubMoleExecution.finished); 68 71 } else { -
trunk/openmole/core/org.openmole.core.workflow.implementation/src/main/java/org/openmole/core/workflow/implementation/transition/ExplorationTransition.java
r3134 r3140 72 72 73 73 74 ISubMoleExecution subS cheduler = new SubMoleExecution(subMole);74 ISubMoleExecution subSubMole = new SubMoleExecution(subMole, values.size()); 75 75 76 76 for (IFactorValues value : values) { … … 116 116 } 117 117 118 submitNextJobsIfReady(destContext, newTicket, toClone, execution, moleExecution, subScheduler); 118 119 submitNextJobsIfReady(destContext, newTicket, toClone, execution, moleExecution, subSubMole); 120 subSubMole.decNbJobInProgress(); 119 121 } 120 122 } -
trunk/openmole/core/org.openmole.core.workflow.model/src/main/java/org/openmole/core/workflow/model/execution/batch/IMoleJobCategory.java
r3138 r3140 19 19 20 20 public interface IMoleJobCategory { 21 boolean equals(IMoleJobCategory category); 22 int hash(); 21 23 22 } -
trunk/openmole/core/org.openmole.core.workflow.model/src/main/java/org/openmole/core/workflow/model/mole/execution/ISubMoleExecution.java
r3034 r3140 26 26 27 27 ISubMoleExecution getParent(); 28 boolean isRoot(); 28 29 29 30 int getNbJobInProgess(); 30 31 void incNbJobInProgress(); 31 32 void decNbJobInProgress(); 33 void addNbJobInProgress(int val); 32 34 } -
trunk/openmole/plugins/org.openmole.plugin.molejobgroupingstrategy.onfactor/src/main/java/org/openmole/plugin/molejobgroupingstrategy/onfactor/FactorCategory.java
r3138 r3140 35 35 36 36 @Override 37 public boolean equals( IMoleJobCategoryobj) {37 public boolean equals(Object obj) { 38 38 if(obj == null) return false; 39 39 if(!obj.getClass().isAssignableFrom(FactorCategory.class)) return false; … … 45 45 46 46 @Override 47 public int hash () {47 public int hashCode() { 48 48 return Arrays.deepHashCode(values); 49 49 }





