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

JobStatus.h

Go to the documentation of this file.
00001 /*
00002 Copyright (c) Members of the EGEE Collaboration. 2004-2010.
00003 See http://www.eu-egee.org/partners for details on the copyright holders.
00004 
00005 Licensed under the Apache License, Version 2.0 (the "License");
00006 you may not use this file except in compliance with the License.
00007 You may obtain a copy of the License at
00008 
00009     http://www.apache.org/licenses/LICENSE-2.0
00010 
00011 Unless required by applicable law or agreed to in writing, software
00012 distributed under the License is distributed on an "AS IS" BASIS,
00013 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014 See the License for the specific language governing permissions and
00015 limitations under the License.
00016 */
00017 
00018 #ifndef __EDG_WORKLOAD_LOGGING_CLIENT_JOBSTATUS_HPP__
00019 #define __EDG_WORKLOAD_LOGGING_CLIENT_JOBSTATUS_HPP__
00020 
00021 /*
00022 
00023   !! Automatically generated file
00024   !! Do not edit, your changes will be discarded upon build
00025   !! Change the corresponding template file ../interface/JobStatus.h.T
00026 
00027 */
00028 
00029 
00030 #include <sys/time.h>
00031 #include <string>
00032 #include <utility>
00033 #include <vector>
00034 
00035 #include "glite/wmsutils/jobid/JobId.h"
00036 
00037 #include "glite/lb/jobstat.h"
00038 #include "glite/lb/CountRef.h"
00039 
00040 EWL_BEGIN_NAMESPACE;
00041 
00054 class JobStatus {
00055         friend class Job;
00056         friend class CountRef<JobStatus>;
00057 public:
00058 
00060         enum Code {
00061                 UNDEF = 0,      
00062                 SUBMITTED,      
00063                 WAITING,        
00064                 READY,  
00065                 SCHEDULED,      
00066                 RUNNING,        
00067                 DONE,   
00068                 CLEARED,        
00069                 ABORTED,        
00070                 CANCELLED,      
00071                 UNKNOWN,        
00072                 PURGED, 
00073                 CODE_MAX 
00074         };
00075 
00081         enum Attr {
00083                 ACL = 0,
00085                 CANCEL_REASON = 1,
00087                 CANCELLING = 2,
00089                 CE_NODE = 3,
00091                 CHILDREN = 4,
00093                 CHILDREN_HIST = 5,
00095                 CHILDREN_NUM = 6,
00097                 CHILDREN_STATES = 7,
00099                 CONDOR_ID = 8,
00101                 CONDOR_DEST_HOST = 9,
00103                 CONDOR_ERROR_DESC = 10,
00105                 CONDOR_JDL = 11,
00107                 CONDOR_JOB_EXIT_STATUS = 12,
00109                 CONDOR_JOB_PID = 13,
00111                 CONDOR_OWNER = 14,
00113                 CONDOR_PREEMPTING = 15,
00115                 CONDOR_REASON = 16,
00117                 CONDOR_SHADOW_EXIT_STATUS = 17,
00119                 CONDOR_SHADOW_PID = 18,
00121                 CONDOR_STARTER_EXIT_STATUS = 19,
00123                 CONDOR_STARTER_PID = 20,
00125                 CONDOR_STATUS = 21,
00127                 CONDOR_UNIVERSE = 22,
00129                 CPU_TIME = 23,
00131                 DESTINATION = 24,
00133                 DONE_CODE = 25,
00135                 EXIT_CODE = 26,
00137                 EXPECT_FROM = 27,
00139                 EXPECT_UPDATE = 28,
00141                 FAILURE_REASONS = 29,
00143                 GLOBUS_ID = 30,
00145                 JDL = 31,
00147                 JOB_ID = 32,
00149                 JOBTYPE = 33,
00151                 LAST_UPDATE_TIME = 34,
00153                 LOCAL_ID = 35,
00155                 LOCATION = 36,
00157                 MATCHED_JDL = 37,
00159                 NETWORK_SERVER = 38,
00161                 OWNER = 39,
00163                 PARENT_JOB = 40,
00165                 PAYLOAD_RUNNING = 41,
00167                 PBS_DEST_HOST = 42,
00169                 PBS_ERROR_DESC = 43,
00171                 PBS_EXIT_STATUS = 44,
00173                 PBS_NAME = 45,
00175                 PBS_OWNER = 46,
00177                 PBS_PID = 47,
00179                 PBS_QUEUE = 48,
00181                 PBS_REASON = 49,
00183                 PBS_RESOURCE_USAGE = 50,
00185                 PBS_SCHEDULER = 51,
00187                 PBS_STATE = 52,
00189                 POSSIBLE_CE_NODES = 53,
00191                 POSSIBLE_DESTINATIONS = 54,
00193                 REASON = 55,
00195                 RESUBMITTED = 56,
00197                 RSL = 57,
00199                 SEED = 58,
00201                 STATE_ENTER_TIME = 59,
00203                 STATE_ENTER_TIMES = 60,
00205                 SUBJOB_FAILED = 61,
00207                 SUSPEND_REASON = 62,
00209                 SUSPENDED = 63,
00211                 UI_HOST = 65,
00213                 USER_TAGS = 64,
00214                 ATTR_MAX = 66 
00215         };
00216 
00217         enum {
00218                 DONE_CODE_OK,   
00219                 DONE_CODE_FAILED,       
00220                 DONE_CODE_CANCELLED,    
00221         };
00222         enum {
00223                 JOBTYPE_SIMPLE, 
00224                 JOBTYPE_DAG,    
00225                 JOBTYPE__PARTITIONABLE_UNUSED,  
00226                 JOBTYPE__PARTITIONED_UNUSED,    
00227                 JOBTYPE_COLLECTION,     
00228                 JOBTYPE_PBS,    
00229                 JOBTYPE_CONDOR, 
00230         };
00236         enum AttrType { INT_T, 
00237                         STRING_T, 
00238                         TIMEVAL_T, 
00239                         BOOL_T, 
00240                         JOBID_T, 
00241                         INTLIST_T, 
00242                         STRLIST_T, 
00243                         TAGLIST_T, 
00244                         STSLIST_T  
00245         };
00246   
00252         Code    status;
00253   
00258         const std::string & name(void) const;
00259   
00267         int     getValInt(Attr name) const;
00268   
00276         std::string getValString(Attr name) const;
00277   
00285         struct timeval  getValTime(Attr name) const;
00286   
00294         const glite::wmsutils::jobid::JobId  getValJobId(Attr name) const;
00295 
00303         bool getValBool(Attr name) const;
00304 
00312         const std::vector<int> getValIntList(Attr name) const;
00313 
00321         const std::vector<std::string> getValStringList(Attr name) const;
00322 
00330         const std::vector<std::pair<std::string,std::string> > getValTagList(Attr name) const;
00331 
00339         const std::vector<JobStatus> getValJobStatusList(Attr name) const;
00340 
00348         static const std::string& getAttrName(Attr name);
00349   
00357         const std::vector<std::pair<Attr,AttrType> >& getAttrs(void) const;
00358 
00367         static const std::string &getStateName(Code state);
00368   
00373         JobStatus(void);
00374 
00382         JobStatus(const JobStatus &orig);
00383 
00391         JobStatus & operator=(const JobStatus &orig);
00392 
00398         JobStatus(const edg_wll_JobStat &src);
00399 
00405         JobStatus & operator=(const edg_wll_JobStat& src);
00406 
00411         virtual ~JobStatus();
00412 
00413 protected:
00414         edg_wll_JobStat *c_ptr(void);
00415 
00416 private:
00417         static void     destroyFlesh(void *);
00418         CountRef<JobStatus> *flesh;
00419 };
00420 
00421 EWL_END_NAMESPACE;
00422 
00423 #endif
00424 

Generated on Fri Aug 20 13:06:41 2010 for Glite LB Client: CPP - Interface by  doxygen 1.3.9.1