XrdCmsPrepArgs.hh

Go to the documentation of this file.
00001 #ifndef __CMS_PREPARGS__H
00002 #define __CMS_PREPARGS__H
00003 /******************************************************************************/
00004 /*                                                                            */
00005 /*                     X r d C m s P r e p A r g s . 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: XrdCmsPrepArgs.hh 25932 2008-10-23 10:58:11Z ganis $
00014   
00015 #include "XProtocol/YProtocol.hh"
00016 
00017 #include "Xrd/XrdJob.hh"
00018 #include "XrdCms/XrdCmsNode.hh"
00019 #include "XrdCms/XrdCmsRRData.hh"
00020 #include "XrdSys/XrdSysPthread.hh"
00021 
00022 class XrdCmsPrepArgs : public XrdJob
00023 {
00024 public:
00025 static const int       iovNum = 2;
00026 
00027 XrdCms::CmsRRHdr        Request;
00028         char           *Ident;
00029         char           *reqid;
00030         char           *notify;
00031         char           *prty;
00032         char           *mode;
00033         char           *path;
00034         char           *opaque;
00035         char           *clPath;   // ->coloc path, if any
00036         int             options;
00037         int             pathlen;  // Includes null byte
00038 
00039         struct iovec    ioV[iovNum];  // To forward the request
00040 
00041         void            DoIt() {if (!XrdCmsNode::do_SelPrep(*this)) delete this;}
00042 
00043 static  void            Process();
00044 
00045         void            Queue();
00046 
00047 static  XrdCmsPrepArgs *getRequest();
00048 
00049                         XrdCmsPrepArgs(XrdCmsRRData &Arg);
00050 
00051                        ~XrdCmsPrepArgs() {if (Data) free(Data);}
00052 
00053 private:
00054 
00055 static XrdSysMutex      PAQueue;
00056 static XrdSysSemaphore  PAReady;
00057        XrdCmsPrepArgs  *Next;
00058 static XrdCmsPrepArgs  *First;
00059 static XrdCmsPrepArgs  *Last;
00060 static int              isIdle;
00061        char            *Data;
00062 
00063 };
00064 #endif

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