1 26 27 package org.objectweb.jonas.ant.cluster; 28 29 import java.io.File ; 30 import org.objectweb.jonas.ant.jonasbase.Db; 31 32 36 public class DbCluster extends ClusterTasks { 37 38 41 private static final String INFO = "[DbCluster] "; 42 43 46 private String [] portRange = null; 47 48 51 public DbCluster() { 52 super(); 53 } 54 55 59 public void setPortRange(String portRange) { 60 this.portRange = portRange.split(","); 61 62 } 63 64 67 public void generatesTasks() { 68 69 int portInd = 0; 70 71 for (int i = getDestDirSuffixIndFirst(); i <= getDestDirSuffixIndLast(); i++) { 72 73 String destDir = getDestDir(getDestDirPrefix(), i); 74 log(INFO + "tasks generation for " + destDir); 75 Db db = new Db(); 77 78 db.setPort(portRange[portInd]); 79 db.setDestDir(new File (destDir)); 80 81 addTask(db); 82 83 portInd++; 84 85 } 86 } 87 } | Popular Tags |