Main Page | Modules | Class Hierarchy | Class List | File List | Class Members | File Members

JobStatus.h

Go to the documentation of this file.
00001 #ifndef __EDG_WORKLOAD_LOGGING_CLIENT_JOBSTATUS_HPP__
00002 #define __EDG_WORKLOAD_LOGGING_CLIENT_JOBSTATUS_HPP__
00003 
00004 /*
00005 
00006   !! Automatically generated file
00007   !! Do not edit, your changes will be discarded upon build
00008   !! Change the corresponding template file ../interface/JobStatus.h.T
00009 
00010 */
00011 
00012 
00013 #include <sys/time.h>
00014 #include <string>
00015 #include <utility>
00016 #include <vector>
00017 
00018 #include "glite/wmsutils/jobid/JobId.h"
00019 
00020 #include "glite/lb/jobstat.h"
00021 #include "glite/lb/CountRef.h"
00022 
00023 EWL_BEGIN_NAMESPACE;
00024 
00037 class JobStatus {
00038         friend class Job;
00039         friend class CountRef<JobStatus>;
00040 public:
00041 
00043         enum Code {
00044                 UNDEF = 0,      
00045                 SUBMITTED,      
00046                 WAITING,        
00047                 READY,  
00048                 SCHEDULED,      
00049                 RUNNING,        
00050                 DONE,   
00051                 CLEARED,        
00052                 ABORTED,        
00053                 CANCELLED,      
00054                 UNKNOWN,        
00055                 PURGED, 
00056                 CODE_MAX 
00057         };
00058 
00064         enum Attr {
00066                 ACL = 0,
00068                 CANCEL_REASON = 1,
00070                 CANCELLING = 2,
00072                 CE_NODE = 3,
00074                 CHILDREN = 4,
00076                 CHILDREN_HIST = 5,
00078                 CHILDREN_NUM = 6,
00080                 CHILDREN_STATES = 7,
00082                 CONDOR_ID = 8,
00084                 CONDOR_DEST_HOST = 9,
00086                 CONDOR_ERROR_DESC = 10,
00088                 CONDOR_JDL = 11,
00090                 CONDOR_JOB_EXIT_STATUS = 12,
00092                 CONDOR_JOB_PID = 13,
00094                 CONDOR_OWNER = 14,
00096                 CONDOR_PREEMPTING = 15,
00098                 CONDOR_REASON = 16,
00100                 CONDOR_SHADOW_EXIT_STATUS = 17,
00102                 CONDOR_SHADOW_PID = 18,
00104                 CONDOR_STARTER_EXIT_STATUS = 19,
00106                 CONDOR_STARTER_PID = 20,
00108                 CONDOR_STATUS = 21,
00110                 CONDOR_UNIVERSE = 22,
00112                 CPU_TIME = 23,
00114                 DESTINATION = 24,
00116                 DONE_CODE = 25,
00118                 EXIT_CODE = 26,
00120                 EXPECT_FROM = 27,
00122                 EXPECT_UPDATE = 28,
00124                 FAILURE_REASONS = 29,
00126                 GLOBUS_ID = 30,
00128                 JDL = 31,
00130                 JOB_ID = 32,
00132                 JOBTYPE = 33,
00134                 LAST_UPDATE_TIME = 34,
00136                 LOCAL_ID = 35,
00138                 LOCATION = 36,
00140                 MATCHED_JDL = 37,
00142                 NETWORK_SERVER = 38,
00144                 OWNER = 39,
00146                 PARENT_JOB = 40,
00148                 PAYLOAD_RUNNING = 41,
00150                 PBS_DEST_HOST = 42,
00152                 PBS_ERROR_DESC = 43,
00154                 PBS_EXIT_STATUS = 44,
00156                 PBS_NAME = 45,
00158                 PBS_OWNER = 46,
00160                 PBS_PID = 47,
00162                 PBS_QUEUE = 48,
00164                 PBS_REASON = 49,
00166                 PBS_RESOURCE_USAGE = 50,
00168                 PBS_SCHEDULER = 51,
00170                 PBS_STATE = 52,
00172                 POSSIBLE_CE_NODES = 53,
00174                 POSSIBLE_DESTINATIONS = 54,
00176                 REASON = 55,
00178                 RESUBMITTED = 56,
00180                 RSL = 57,
00182                 SEED = 58,
00184                 STATE_ENTER_TIME = 59,
00186                 STATE_ENTER_TIMES = 60,
00188                 SUBJOB_FAILED = 61,
00190                 SUSPEND_REASON = 62,
00192                 SUSPENDED = 63,
00194                 UI_HOST = 65,
00196                 USER_TAGS = 64,
00197                 ATTR_MAX = 66 
00198         };
00199 
00200         enum {
00201                 DONE_CODE_OK,   
00202                 DONE_CODE_FAILED,       
00203                 DONE_CODE_CANCELLED,    
00204         };
00205         enum {
00206                 JOBTYPE_SIMPLE, 
00207                 JOBTYPE_DAG,    
00208                 JOBTYPE__PARTITIONABLE_UNUSED,  
00209                 JOBTYPE__PARTITIONED_UNUSED,    
00210                 JOBTYPE_COLLECTION,     
00211                 JOBTYPE_PBS,    
00212                 JOBTYPE_CONDOR, 
00213         };
00219         enum AttrType { INT_T, 
00220                         STRING_T, 
00221                         TIMEVAL_T, 
00222                         BOOL_T, 
00223                         JOBID_T, 
00224                         INTLIST_T, 
00225                         STRLIST_T, 
00226                         TAGLIST_T, 
00227                         STSLIST_T  
00228         };
00229   
00235         Code    status;
00236   
00241         const std::string & name(void) const;
00242   
00250         int     getValInt(Attr name) const;
00251   
00259         std::string getValString(Attr name) const;
00260   
00268         struct timeval  getValTime(Attr name) const;
00269   
00277         const glite::wmsutils::jobid::JobId  getValJobId(Attr name) const;
00278 
00286         bool getValBool(Attr name) const;
00287 
00295         const std::vector<int> getValIntList(Attr name) const;
00296 
00304         const std::vector<std::string> getValStringList(Attr name) const;
00305 
00313         const std::vector<std::pair<std::string,std::string> > getValTagList(Attr name) const;
00314 
00322         const std::vector<JobStatus> getValJobStatusList(Attr name) const;
00323 
00331         static const std::string& getAttrName(Attr name);
00332   
00340         const std::vector<std::pair<Attr,AttrType> >& getAttrs(void) const;
00341 
00350         static const std::string &getStateName(Code state);
00351   
00356         JobStatus(void);
00357 
00365         JobStatus(const JobStatus &orig);
00366 
00374         JobStatus & operator=(const JobStatus &orig);
00375 
00381         JobStatus(const edg_wll_JobStat &src);
00382 
00388         JobStatus & operator=(const edg_wll_JobStat& src);
00389 
00394         virtual ~JobStatus();
00395 
00396 protected:
00397         edg_wll_JobStat *c_ptr(void);
00398 
00399 private:
00400         static void     destroyFlesh(void *);
00401         CountRef<JobStatus> *flesh;
00402 };
00403 
00404 EWL_END_NAMESPACE;
00405 
00406 #endif
00407 

Generated on Mon May 5 15:16:52 2008 for Glite LB Client: CPP - Interface by  doxygen 1.3.9.1