• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

XrdCmsPrepare.hh

Go to the documentation of this file.
00001 #ifndef __CMS_PREPARE__H
00002 #define __CMS_PREPARE__H
00003 /******************************************************************************/
00004 /*                                                                            */
00005 /*                      X r d C m s P r e p a r e . h h                       */
00006 /*                                                                            */
00007 /* (c) 2007 by the Board of Trustees of the Leland Stanford, Jr., University  */
00008 /*                            All Rights Reserved                             */
00009 /*   Produced by Andrew Hanushevsky for Stanford University under contract    */
00010 /*              DE-AC02-76-SFO0515 with the Department of Energy              */
00011 /******************************************************************************/
00012 
00013 //         $Id: XrdCmsPrepare.hh,v 1.2 2009/01/16 02:45:46 abh Exp $
00014   
00015 #include "Xrd/XrdJob.hh"
00016 #include "Xrd/XrdScheduler.hh"
00017 
00018 #include "XrdCms/XrdCmsPrepArgs.hh"
00019 #include "XrdOuc/XrdOucHash.hh"
00020 #include "XrdOuc/XrdOucStream.hh"
00021 #include "XrdSys/XrdSysPthread.hh"
00022 
00023 class XrdNetMsg;
00024 class XrdOucMsubs;
00025 class XrdOucName2Name;
00026 
00027 class XrdCmsPrepare : public XrdJob
00028 {
00029 public:
00030 
00031 int        Add(XrdCmsPrepArgs &pargs);
00032 
00033 int        Del(char *reqid);
00034 
00035 int        Exists(char *path);
00036 
00037 void       Gone(char *path);
00038 
00039 void       DoIt();
00040 
00041 void       Inform(const char *cmd, XrdCmsPrepArgs *pargs);
00042 
00043 int        Pending() {return NumFiles;}
00044 
00045 void       Prepare(XrdCmsPrepArgs *pargs);
00046 
00047 void       Queue(XrdCmsPrepArgs *parg);
00048 
00049 int        Reset();
00050 
00051 int        setParms(int rcnt, int stime, int deco=0);
00052 
00053 int        setParms(char *ifpgm, char *ifmsg=0);
00054 
00055 int        setParms(XrdOucName2Name *n2n) {N2N = n2n; return 0;}
00056 
00057            XrdCmsPrepare();
00058           ~XrdCmsPrepare() {}   // Never gets deleted
00059 
00060 private:
00061 
00062 int        getID(const char *Tid, char *buff, int bsz);
00063 int        isOnline(char *path);
00064 void       Scrub();
00065 int        startIF();
00066 
00067 XrdSysMutex           PTMutex;
00068 XrdOucHash<char>      PTable;
00069 XrdOucStream          prepSched;
00070 XrdOucName2Name      *N2N;
00071 XrdOucMsubs          *prepMsg;
00072 XrdNetMsg            *Relay;
00073 time_t                lastemsg;
00074 pid_t                 preppid;
00075 int                   NumFiles;
00076 int                   doEcho;
00077 int                   resetcnt;
00078 int                   scrub2rst;
00079 int                   scrubtime;
00080 int                   isFrm;
00081 char                 *prepif;
00082 };
00083 
00084 namespace XrdCms
00085 {
00086 extern    XrdCmsPrepare PrepQ;
00087 }
00088 #endif

Generated on Wed Sep 1 2010 for xrootd by  doxygen 1.7.1