XrdJob.hh

Go to the documentation of this file.
00001 #ifndef ___XRD_JOB_H___
00002 #define ___XRD_JOB_H___
00003 /******************************************************************************/
00004 /*                                                                            */
00005 /*                             X r d J o b . h h                              */
00006 /*                                                                            */
00007 /* (c) 2004 by the Board of Trustees of the Leland Stanford, Jr., University  */
00008 /*       All Rights Reserved. See XrdInfo.cc for complete License Terms       */
00009 /*   Produced by Andrew Hanushevsky for Stanford University under contract    */
00010 /*              DE-AC03-76-SFO0515 with the Department of Energy              */
00011 /******************************************************************************/
00012 
00013 //          $Id: XrdJob.hh 22437 2008-03-04 14:35:16Z rdm $ 
00014 
00015 #include <stdlib.h>
00016 #include <string.h>
00017 #include <strings.h>
00018 #include <time.h>
00019   
00020 // The XrdJob class is a super-class that is inherited by any class that needs
00021 // to schedule work on behalf of itself. The XrdJob class is optimized for
00022 // queue processing since that's where it spends a lot of time. This class
00023 // should not be depedent on any other class.
00024 
00025 class XrdJob
00026 {
00027 friend class XrdScheduler;
00028 public:
00029 XrdJob    *NextJob;   // -> Next job in the queue (zero if last)
00030 const char *Comment;   // -> Description of work for debugging (static!)
00031 
00032 virtual void  DoIt() = 0;
00033 
00034               XrdJob(const char *desc="")
00035                     {Comment = desc; NextJob = 0; SchedTime = 0;}
00036 virtual      ~XrdJob() {}
00037 
00038 private:
00039 time_t      SchedTime; // -> Time job is to be scheduled
00040 };
00041 #endif

Generated on Tue Jul 5 14:46:14 2011 for ROOT_528-00b_version by  doxygen 1.5.1