xrootd
Loading...
Searching...
No Matches
XrdCmsPrepare.hh
Go to the documentation of this file.
1#ifndef __CMS_PREPARE__H
2#define __CMS_PREPARE__H
3/******************************************************************************/
4/* */
5/* X r d C m s P r e p a r e . h h */
6/* */
7/* (c) 2007 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
33#include "Xrd/XrdJob.hh"
34#include "Xrd/XrdScheduler.hh"
35
37#include "XrdOuc/XrdOucHash.hh"
40
41class XrdFrcProxy;
42class XrdNetMsg;
43class XrdOucMsubs;
44class XrdOucName2Name;
45
46class XrdCmsPrepare : public XrdJob
47{
48public:
49
50int Add(XrdCmsPrepArgs &pargs);
51
52int Del(char *reqid);
53
54int Exists(char *path);
55
56void Gone(char *path);
57
58void DoIt();
59
60void Init();
61
62void Inform(const char *cmd, XrdCmsPrepArgs *pargs);
63
64int isOK() {return prepOK;}
65
66int Pending() {return NumFiles;}
67
69
70void Reset(const char *iName, const char *aPath, int aMode);
71
72int setParms(int rcnt, int stime, int deco=0);
73
74int setParms(const char *ifpgm, char *ifmsg=0);
75
76int setParms(XrdOucName2Name *n2n) {N2N = n2n; return 0;}
77
79 ~XrdCmsPrepare() {} // Never gets deleted
80
81private:
82
83int isOnline(char *path);
84void Reset();
85void Scrub();
86int startIF();
87
95char *prepif;
96time_t lastemsg;
97pid_t preppid;
104};
105
106namespace XrdCms
107{
108extern XrdCmsPrepare PrepQ;
109}
110#endif
Definition XrdCmsPrepArgs.hh:41
Definition XrdCmsPrepare.hh:47
void Prepare(XrdCmsPrepArgs *pargs)
char * prepif
Definition XrdCmsPrepare.hh:95
int scrubtime
Definition XrdCmsPrepare.hh:103
int setParms(XrdOucName2Name *n2n)
Definition XrdCmsPrepare.hh:76
XrdSysMutex PTMutex
Definition XrdCmsPrepare.hh:88
int isOnline(char *path)
int setParms(int rcnt, int stime, int deco=0)
void Gone(char *path)
~XrdCmsPrepare()
Definition XrdCmsPrepare.hh:79
XrdFrcProxy * PrepFrm
Definition XrdCmsPrepare.hh:94
int Exists(char *path)
XrdOucHash< char > PTable
Definition XrdCmsPrepare.hh:89
XrdNetMsg * Relay
Definition XrdCmsPrepare.hh:93
void Inform(const char *cmd, XrdCmsPrepArgs *pargs)
XrdOucMsubs * prepMsg
Definition XrdCmsPrepare.hh:92
time_t lastemsg
Definition XrdCmsPrepare.hh:96
int Add(XrdCmsPrepArgs &pargs)
int NumFiles
Definition XrdCmsPrepare.hh:99
XrdOucName2Name * N2N
Definition XrdCmsPrepare.hh:91
int scrub2rst
Definition XrdCmsPrepare.hh:102
int prepOK
Definition XrdCmsPrepare.hh:98
int setParms(const char *ifpgm, char *ifmsg=0)
int doEcho
Definition XrdCmsPrepare.hh:100
int isOK()
Definition XrdCmsPrepare.hh:64
XrdOucStream prepSched
Definition XrdCmsPrepare.hh:90
pid_t preppid
Definition XrdCmsPrepare.hh:97
int Del(char *reqid)
void Reset(const char *iName, const char *aPath, int aMode)
int Pending()
Definition XrdCmsPrepare.hh:66
int resetcnt
Definition XrdCmsPrepare.hh:101
Definition XrdFrcProxy.hh:40
Definition XrdJob.hh:43
Definition XrdNetMsg.hh:50
Definition XrdOucHash.hh:128
Definition XrdOucMsubs.hh:91
Definition XrdOucName2Name.hh:49
Definition XrdOucStream.hh:47
Definition XrdSysPthread.hh:165
Definition YProtocol.hh:78
XrdCmsPrepare PrepQ