Show
Ignore:
Timestamp:
03/02/10 18:31:54 (2 years ago)
Author:
romain.reuillon
Message:

Bug fix in grouping and submole execution

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  
    3232    } 
    3333 
    34  
    3534    public SubMoleExecution(ISubMoleExecution parent) { 
    3635        this.parent = parent; 
     36    } 
     37 
     38    public SubMoleExecution(ISubMoleExecution parent, int nbJobInProgress) { 
     39        this.parent = parent; 
     40        addNbJobInProgress(nbJobInProgress); 
    3741    } 
    3842 
     
    4549    public void incNbJobInProgress() { 
    4650       nbJobInProgress++; 
     51       if(!isRoot()) getParent().incNbJobInProgress(); 
    4752    } 
    4853 
     
    5055    public void decNbJobInProgress() { 
    5156        nbJobInProgress--; 
     57        if(!isRoot()) getParent().decNbJobInProgress(); 
    5258    } 
    5359 
     
    5763    } 
    5864 
     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 
    5976 
    6077 

logo cemagref

logo iscpif

logo lifegrid

logo region auvergne

logo patres project