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

XrdOlbPrepArgs.hh

Go to the documentation of this file.
00001 #ifndef __OLB_PREPARGS__H
00002 #define __OLB_PREPARGS__H
00003 /******************************************************************************/
00004 /*                                                                            */
00005 /*                     X r d O l b 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: XrdOlbPrepArgs.hh,v 1.2 2007/07/26 15:18:24 ganis Exp $
00014   
00015 #include "Xrd/XrdJob.hh"
00016 #include "XrdOlb/XrdOlbServer.hh"
00017 #include "XrdSys/XrdSysPthread.hh"
00018 
00019 class XrdOlbPrepArgs : public XrdJob
00020 {
00021 public:
00022 static const int       iovNum = 12;
00023 
00024        char           *reqid;
00025        char           *user;
00026        char           *prty;
00027        char           *mode;
00028        char           *path;
00029        char           *data;
00030        struct iovec    Msg[iovNum];
00031        int             Stage;
00032        int             endP;
00033 
00034        void            Clear() {reqid = user = prty = mode = path = data = 0;
00035                                 Next = 0; Stage = 0;}
00036 
00037        void            DoIt() {if (!XrdOlbServer::Resume(this)) delete this;}
00038 
00039        int             prepMsg();
00040 
00041        int             prepMsg(const char *Cmd, const char *Info);
00042 
00043        void            Queue();
00044 
00045 static XrdOlbPrepArgs *Request();
00046 
00047                        XrdOlbPrepArgs(int srvr) : XrdJob("prepare") 
00048                                         {Clear(); endP = srvr;}
00049 
00050                       ~XrdOlbPrepArgs() {if (data) free(data);}
00051 
00052 private:
00053 
00054 static XrdSysMutex     PAQueue;
00055 static XrdSysSemaphore PAReady;
00056        XrdOlbPrepArgs *Next;
00057 static XrdOlbPrepArgs *First;
00058 static XrdOlbPrepArgs *Last;
00059 
00060 };
00061 #endif

Generated on Wed Sep 1 2010 for xrootd by  doxygen 1.7.1