xrootd
XrdCnsLogClient.hh
Go to the documentation of this file.
1 #ifndef __XRDCNSLogClient_h_
2 #define __XRDCNSLogClient_h_
3 /******************************************************************************/
4 /* */
5 /* X r d C n s L o g C l i e n t . h h */
6 /* */
7 /* (c) 2009 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 <sys/param.h>
34 
35 #include "XrdSys/XrdSysPthread.hh"
36 
37 class XrdClient;
38 class XrdClientAdmin;
39 class XrdCnsLogFile;
40 class XrdCnsLogRec;
41 class XrdCnsXref;
42 class XrdOucTList;
43 
45 {
46 public:
47 
48 int Activate(XrdCnsLogFile *basefile);
49 
50 int Init();
51 
52 int Run(int Always=1);
53 
54 int Start();
55 
58 
59 private:
61 
63 int do_Create(XrdCnsLogRec *lrP, const char *lfn=0);
65 int do_Mv(XrdCnsLogRec *lrP);
66 int do_Rm(XrdCnsLogRec *lrP);
68 int do_Trunc(XrdCnsLogRec *lrP, const char *lfn=0);
69 char getMount(char *Lfn, char *Pfn, XrdCnsXref &Mount);
70 int Inventory(XrdCnsLogFile *lfp, const char *dPath);
71 int Manifest();
72 int mapError(int rc);
73 int xrdEmsg(const char *Opname, const char *theFN, XrdClientAdmin *aP);
74 int xrdEmsg(const char *Opname, const char *theFN);
75 int xrdEmsg(const char *Opname, const char *theFN, XrdClient *fP);
76 
81 
84 
85 int pfxNF;
86 int sfxFN;
87 int arkOnly;
88 
89 char *admURL;
90 char *urlHost;
91 
92 char arkURL[MAXPATHLEN+512];
93 char *arkPath;
94 char *arkFN;
95 char crtURL[MAXPATHLEN+512];
96 char *crtFN;
97 char logDir[MAXPATHLEN+1];
98 char *logFN;
99 };
100 #endif
Definition: XrdClientAdmin.hh:63
Definition: XrdClient.hh:121
Definition: XrdCnsLogClient.hh:45
XrdClientAdmin * admConnect(XrdClientAdmin *adminP)
char * urlHost
Definition: XrdCnsLogClient.hh:90
XrdSysSemaphore lfSem
Definition: XrdCnsLogClient.hh:78
XrdClientAdmin * Admin
Definition: XrdCnsLogClient.hh:80
char * crtFN
Definition: XrdCnsLogClient.hh:96
int do_Trunc(XrdCnsLogRec *lrP, const char *lfn=0)
~XrdCnsLogClient()
Definition: XrdCnsLogClient.hh:57
int arkOnly
Definition: XrdCnsLogClient.hh:87
char * arkFN
Definition: XrdCnsLogClient.hh:94
int do_Rmdir(XrdCnsLogRec *lrP)
int do_Mkdir(XrdCnsLogRec *lrP)
XrdCnsLogClient * Next
Definition: XrdCnsLogClient.hh:79
int Inventory(XrdCnsLogFile *lfp, const char *dPath)
char * arkPath
Definition: XrdCnsLogClient.hh:93
char arkURL[MAXPATHLEN+512]
Definition: XrdCnsLogClient.hh:92
int do_Mv(XrdCnsLogRec *lrP)
int xrdEmsg(const char *Opname, const char *theFN)
int Archive(XrdCnsLogFile *lfP)
int Activate(XrdCnsLogFile *basefile)
char * logFN
Definition: XrdCnsLogClient.hh:98
int mapError(int rc)
XrdSysMutex lfMutex
Definition: XrdCnsLogClient.hh:77
char * admURL
Definition: XrdCnsLogClient.hh:89
char logDir[MAXPATHLEN+1]
Definition: XrdCnsLogClient.hh:97
int sfxFN
Definition: XrdCnsLogClient.hh:86
int Run(int Always=1)
XrdCnsLogFile * logLast
Definition: XrdCnsLogClient.hh:83
XrdCnsLogClient(XrdOucTList *rP, XrdCnsLogClient *pcP)
int pfxNF
Definition: XrdCnsLogClient.hh:85
char getMount(char *Lfn, char *Pfn, XrdCnsXref &Mount)
char crtURL[MAXPATHLEN+512]
Definition: XrdCnsLogClient.hh:95
int xrdEmsg(const char *Opname, const char *theFN, XrdClientAdmin *aP)
int do_Create(XrdCnsLogRec *lrP, const char *lfn=0)
XrdCnsLogFile * logFirst
Definition: XrdCnsLogClient.hh:82
int do_Rm(XrdCnsLogRec *lrP)
int xrdEmsg(const char *Opname, const char *theFN, XrdClient *fP)
Definition: XrdCnsLogFile.hh:37
Definition: XrdCnsLogRec.hh:44
Definition: XrdCnsXref.hh:37
Definition: XrdOucTList.hh:42
Definition: XrdSysPthread.hh:166
Definition: XrdSysPthread.hh:404