Coverage details for umich.cac.data.ExecHostField

LineHitsSource
1 package umich.cac.data;
2  
3 import umich.cac.pbs.FieldFactory;
4  
5 /**
6  * This class encapsulates the Resource_List.exec_host field in PBS. An entry
7  * in the data file might look like
8  *
9  * <pre>
10  * exec_host=node127m/0+node126m/2
11  * </pre>
12  *
13  * @author rmach@umich.edu
14  * @version $Header: /cvsroot/pbsaccounting/pbsaccounting/src/umich/cac/data/ExecHostField.java,v 1.3 2003/10/21 19:08:00 rodmach Exp $
15  */
16 public class ExecHostField extends Field {
17  
18     /** The seperator PBS uses for the exec_host nodes */
1912    private String NODE_SEPARATOR = "\\+";
20  
21     /**
22      * Constructor for NeedsNodes field
23      *
24      * @param fieldName
25      * name of this field
26      * @param rawValue
27      * the value of this field from PBS accounting data
28      */
29     public ExecHostField(FieldName fieldName, String rawValue) {
3012        super(fieldName, rawValue, FieldType.RESOURCE_USED);
3112        setupChildren(rawValue);
3212    }
33  
34     /**
35      * Contains children of type node. These are encoded in PBS as
36      * node1+node2+node3+ with + as the sepaator
37      *
38      * @param rawValue
39      * raw data from PBS accounting file for exec_host
40      */
41     private void setupChildren(String rawValue) {
42  
4312        String[] innerNodes = rawValue.split(NODE_SEPARATOR);
44  
45         //Construct the list of NODE children
4636        for (int j = 0; j < innerNodes.length; j++) {
4724            Field nodeField =
48                 FieldFactory.getInstance().getField(
49                     FieldName.NODE,
50                     innerNodes[j]);
5124            addChild(nodeField);
52         }
53  
5412    }
55  
56 }

this report was generated by version 1.0.5 of jcoverage.
visit www.jcoverage.com for updates.

copyright © 2003, jcoverage ltd. all rights reserved.
Java is a trademark of Sun Microsystems, Inc. in the United States and other countries.