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
36
37class XrdClient;
38class XrdClientAdmin;
39class XrdCnsLogFile;
40class XrdCnsLogRec;
41class XrdCnsXref;
42class XrdOucTList;
43
45{
46public:
47
48int Activate(XrdCnsLogFile *basefile);
49
50int Init();
51
52int Run(int Always=1);
53
54int Start();
55
58
59private:
61
63int do_Create(XrdCnsLogRec *lrP, const char *lfn=0);
68int do_Trunc(XrdCnsLogRec *lrP, const char *lfn=0);
69char getMount(char *Lfn, char *Pfn, XrdCnsXref &Mount);
70int Inventory(XrdCnsLogFile *lfp, const char *dPath);
72int mapError(int rc);
73int xrdEmsg(const char *Opname, const char *theFN, XrdClientAdmin *aP);
74int xrdEmsg(const char *Opname, const char *theFN);
75int xrdEmsg(const char *Opname, const char *theFN, XrdClient *fP);
76
81
84
88
89char *admURL;
90char *urlHost;
91
92char arkURL[MAXPATHLEN+512];
93char *arkPath;
94char *arkFN;
95char crtURL[MAXPATHLEN+512];
96char *crtFN;
97char logDir[MAXPATHLEN+1];
98char *logFN;
99};
100#endif
Definition: XrdClientAdmin.hh:63
Definition: XrdClient.hh:121
Definition: XrdCnsLogClient.hh:45
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)
XrdClientAdmin * admConnect(XrdClientAdmin *adminP)
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