xrootd
XrdFrmXfrQueue.hh
Go to the documentation of this file.
1 #ifndef __FRMXFRQUEUE_H__
2 #define __FRMXFRQUEUE_H__
3 /******************************************************************************/
4 /* */
5 /* X r d F r m X f r Q u e u e . h h */
6 /* */
7 /* (c) 2010 by the Board of Trustees of the Leland Stanford, Jr., University */
8 /* All Rights Reserved */
9 /* Produced by Andrew Hanushevsky for Stanford University under contract */
10 /* DE-AC02-76-SFO0515 with the Department of Energy */
11 /******************************************************************************/
12 
13 #include "XrdFrc/XrdFrcRequest.hh"
14 #include "XrdOuc/XrdOucHash.hh"
15 #include "XrdSys/XrdSysPthread.hh"
16 
17 class XrdFrcReqFile;
18 class XrdFrcRequest;
19 class XrdFrmXfrJob;
20 
22 {
23 public:
24 
25 static int Add(XrdFrcRequest *rP, XrdFrcReqFile *reqF, int theQ);
26 
27 static void Done(XrdFrmXfrJob *xP, const char *Msg);
28 
29 static XrdFrmXfrJob *Get();
30 
31 static int Init();
32 
33 static void StopMon(void *parg);
34 
37 
38 private:
39 
40 static XrdFrmXfrJob *Pull();
41 static int Notify(XrdFrcRequest *rP,int qN,int rc,const char *msg=0);
42 static void Send2File(char *Dest, char *Msg, int Mln);
43 static void Send2UDP(char *Dest, char *Msg, int Mln);
44 static int Stopped(int qNum);
45 static const char *xfrName(XrdFrcRequest &reqData, int isOut);
46 
49 
52 
53 struct theQueue
59  const char *File;
60  const char *Name;
61  int Stop;
62  int qNum;
63  theQueue() : Avail(0),Free(0),First(0),Last(0),Alert(0),Stop(0) {}
64  ~theQueue() {}
65  };
67 };
68 #endif