1 64 package com.jcorporate.expresso.services.dbobj; 65 66 import com.jcorporate.expresso.core.controller.ControllerRequest; 67 import com.jcorporate.expresso.core.db.DBException; 68 import com.jcorporate.expresso.core.dbobj.SecuredDBObject; 69 70 71 74 public class JobHandlerRegistry extends SecuredDBObject { 75 76 79 public static final String FLD_OSNAME = "OSName"; 80 81 84 public static final String FLD_LOAD_AVERAGE = "LoadAverage"; 85 86 89 public static final String FLD_CURR_JOBNUM = "CurrentJobs"; 90 91 94 public static final String FLD_TIMESTAMP = "TimStamp"; 96 99 public static final String FLD_HOSTNAME = "HostName"; 100 101 104 public static final String FLD_STATUS = "Status"; 105 106 109 public static final String FLD_SERVERID = "ServerID"; 110 111 114 public static final String FLD_FREEMEM = "FreeMem"; 115 116 119 public static final String FLD_TOTALMEM = "TotalMem"; 120 121 124 public static final String FLD_USEDMEM = "UsedMem"; 125 126 129 public static final String FLD_POWERFACTOR = "PowerFactor"; 130 131 134 public static final String FLD_OPERATION = "ControlCommand"; 135 136 140 public JobHandlerRegistry() throws DBException { 141 } 142 143 151 public JobHandlerRegistry(ControllerRequest request) 152 throws DBException { 153 super(request); 154 } 155 156 160 public JobHandlerRegistry(int uid) throws DBException { 161 super(uid); 162 } 163 164 167 protected synchronized void setupFields() throws DBException { 168 setTargetTable("JOBHANDLERREGISTRY"); 169 setDescription("DBjobHandlerRegistry"); 170 addField(FLD_LOAD_AVERAGE, "int", 0, true, "jhLoadAvg"); 171 addField(FLD_CURR_JOBNUM, "int", 0, true, "nofJobs"); 172 addField(FLD_TIMESTAMP, "datetime", 0, true, "timeStamp"); 173 addField(FLD_STATUS, "varchar", 255, true, "jobHandlerStatus"); 174 addField(FLD_POWERFACTOR, "double", 0, true, "powerFactor"); 175 addField(FLD_TOTALMEM, "int", 0, true, "totalMemory"); 176 addField(FLD_FREEMEM, "int", 0, true, "freeMemory"); 177 addField(FLD_USEDMEM, "int", 0, true, "memoryInUse"); 178 addField(FLD_SERVERID, "int", 0, false, "handlingServer"); 179 addField(FLD_HOSTNAME, "varchar", 160, false, "jobHandlerName"); 180 addField(FLD_OSNAME, "varchar", 255, false, "jobHandlerOSName"); 181 addField(FLD_OPERATION, "varchar", 255, true, "jobHandlerControlCommand"); 182 addKey(FLD_SERVERID); 183 addKey(FLD_HOSTNAME); 184 } 185 } 186 | Popular Tags |