xrootd
Loading...
Searching...
No Matches
XrdFrcProxy.hh
Go to the documentation of this file.
1#ifndef __XRDFRCPROXY__
2#define __XRDFRCPROXY__
3/******************************************************************************/
4/* */
5/* X r d F r c P r o x y . 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/* This file is part of the XRootD software suite. */
13/* */
14/* XRootD is free software: you can redistribute it and/or modify it under */
15/* the terms of the GNU Lesser General Public License as published by the */
16/* Free Software Foundation, either version 3 of the License, or (at your */
17/* option) any later version. */
18/* */
19/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
20/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
21/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
22/* License for more details. */
23/* */
24/* You should have received a copy of the GNU Lesser General Public License */
25/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
26/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
27/* */
28/* The copyright holder's institutional names and contributor's names may not */
29/* be used to endorse or promote products derived from this software without */
30/* specific prior written permission of the institution or contributor. */
31/******************************************************************************/
32
34
35class XrdFrcReqAgent;
36class XrdOucStream;
37class XrdSysLogger;
38
40{
41public:
42
43int Add(char Opc, const char *Lfn, const char *Opq, const char *Usr,
44 const char *Rid, const char *Nop, const char *Pop,
45 int Prty=1);
46
47int Del(char Opc, const char *Rid);
48
49static const int opGet = 1;
50static const int opPut = 2;
51static const int opMig = 4;
52static const int opStg = 8;
53static const int opAll = 15;
54
55class Queues
56 {friend class XrdFrcProxy;
57 int Offset;
58 char Prty;
59 char QList;
60 char QNow;
61 char Active;
62 public:
63 Queues(int opX) : Offset(0), Prty(0), QList(opX), QNow(0), Active(0) {}
65 };
66
67int List(Queues &State, char *Buff, int Bsz);
68
69int List(int qType, int qPrty, XrdFrcRequest::Item *Items, int Num);
70
71int Init(int opX, const char *aPath, int aMode, const char *qPath=0);
72
73 XrdFrcProxy(XrdSysLogger *lP, const char *iName, int Debug=0);
75
76private:
77
78int Init2(const char *cfgFN);
79int qChk(XrdOucStream &cFile);
80
81struct o2qMap {const char *qName; int qType; int oType;};
82
83static o2qMap oqMap[];
84static int oqNum;
85
87const char *insName;
88char *intName;
89char *QPath;
90};
91#endif
Definition XrdFrcProxy.hh:56
char Prty
Definition XrdFrcProxy.hh:58
int Offset
Definition XrdFrcProxy.hh:57
~Queues()
Definition XrdFrcProxy.hh:64
char Active
Definition XrdFrcProxy.hh:61
char QList
Definition XrdFrcProxy.hh:59
char QNow
Definition XrdFrcProxy.hh:60
Queues(int opX)
Definition XrdFrcProxy.hh:63
Definition XrdFrcProxy.hh:40
int Add(char Opc, const char *Lfn, const char *Opq, const char *Usr, const char *Rid, const char *Nop, const char *Pop, int Prty=1)
char * QPath
Definition XrdFrcProxy.hh:89
~XrdFrcProxy()
Definition XrdFrcProxy.hh:74
static const int opPut
Definition XrdFrcProxy.hh:50
int List(int qType, int qPrty, XrdFrcRequest::Item *Items, int Num)
int Init(int opX, const char *aPath, int aMode, const char *qPath=0)
const char * insName
Definition XrdFrcProxy.hh:87
static const int opGet
Definition XrdFrcProxy.hh:49
static const int opMig
Definition XrdFrcProxy.hh:51
static int oqNum
Definition XrdFrcProxy.hh:84
int List(Queues &State, char *Buff, int Bsz)
int Init2(const char *cfgFN)
static const int opStg
Definition XrdFrcProxy.hh:52
static const int opAll
Definition XrdFrcProxy.hh:53
char * intName
Definition XrdFrcProxy.hh:88
int qChk(XrdOucStream &cFile)
XrdFrcProxy(XrdSysLogger *lP, const char *iName, int Debug=0)
static o2qMap oqMap[]
Definition XrdFrcProxy.hh:83
XrdFrcReqAgent * Agent[XrdFrcRequest::numQ]
Definition XrdFrcProxy.hh:86
int Del(char Opc, const char *Rid)
Definition XrdFrcReqAgent.hh:37
Item
Definition XrdFrcRequest.hh:82
static const int numQ
Definition XrdFrcRequest.hh:92
Definition XrdOucStream.hh:47
Definition XrdSysLogger.hh:53
Definition XrdFrcProxy.hh:81
const char * qName
Definition XrdFrcProxy.hh:81
int oType
Definition XrdFrcProxy.hh:81
int qType
Definition XrdFrcProxy.hh:81