xrootd
Loading...
Searching...
No Matches
XrdCmsAdmin.hh
Go to the documentation of this file.
1#ifndef __CMSADMIN__
2#define __CMSADMIN__
3/******************************************************************************/
4/* */
5/* X r d C m s A d m i n . 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 <cstdlib>
34#include <sys/uio.h>
35
41
42class XrdNetSocket;
43class XrdOucTList;
44
46{
47public:
48
49static bool InitAREvents(void *arFunc);
50
51 void Login(int socknum);
52
53 void MonAds();
54
55static void setSync(XrdSysSemaphore *sync) {SyncUp = sync;}
56
57 void *Notes(XrdNetSocket *AdminSock);
58
59static void Relay(int setSock, int newSock);
60
61static void RelayAREvent();
62
63 void Send(const char *Req, XrdCmsRRData &Data);
64
65 void *Start(XrdNetSocket *AdminSock);
66
67 XrdCmsAdmin() {Sname = 0; Stype = "Server"; Primary = 0;}
68 ~XrdCmsAdmin() {if (Sname) free(Sname);}
69
70private:
71
72static
73void AddEvent(const char *path, XrdCms::CmsReqCode req, int mods);
74void BegAds();
75bool CheckVNid(const char *xNid);
76int Con2Ads(const char *pname);
78void do_Perf(bool alert=false);
79void do_RmDid(int dotrim=0);
80void do_RmDud(int dotrim=0);
81
87static bool arePost;
88
91static int POnline;
93 const char *Stype;
94 char *Sname;
96};
97#endif
int(* XrdOssStatInfo2_t)(const char *path, struct stat *buff, int opts, XrdOucEnv *envP, const char *lfn)
Definition XrdOssStatInfo.hh:93
Definition XrdCmsAdmin.hh:46
XrdCmsAdmin()
Definition XrdCmsAdmin.hh:67
int Primary
Definition XrdCmsAdmin.hh:95
static void Relay(int setSock, int newSock)
bool CheckVNid(const char *xNid)
static void AddEvent(const char *path, XrdCms::CmsReqCode req, int mods)
static void RelayAREvent()
void Send(const char *Req, XrdCmsRRData &Data)
void do_RmDud(int dotrim=0)
static XrdOucTList * areLast
Definition XrdCmsAdmin.hh:84
static XrdSysMutex areMutex
Definition XrdCmsAdmin.hh:85
XrdOucStream Stream
Definition XrdCmsAdmin.hh:92
void * Start(XrdNetSocket *AdminSock)
static bool arePost
Definition XrdCmsAdmin.hh:87
static void setSync(XrdSysSemaphore *sync)
Definition XrdCmsAdmin.hh:55
static XrdSysSemaphore * SyncUp
Definition XrdCmsAdmin.hh:90
void BegAds()
void * Notes(XrdNetSocket *AdminSock)
char * Sname
Definition XrdCmsAdmin.hh:94
int Con2Ads(const char *pname)
void Login(int socknum)
void do_Perf(bool alert=false)
int do_Login()
~XrdCmsAdmin()
Definition XrdCmsAdmin.hh:68
static XrdSysSemaphore areSem
Definition XrdCmsAdmin.hh:86
const char * Stype
Definition XrdCmsAdmin.hh:93
static XrdSysMutex myMutex
Definition XrdCmsAdmin.hh:89
static XrdOssStatInfo2_t areFunc
Definition XrdCmsAdmin.hh:82
void MonAds()
void do_RmDid(int dotrim=0)
static bool InitAREvents(void *arFunc)
static int POnline
Definition XrdCmsAdmin.hh:91
static XrdOucTList * areFirst
Definition XrdCmsAdmin.hh:83
Definition XrdCmsRRData.hh:52
Definition XrdNetSocket.hh:48
Definition XrdOucStream.hh:47
Definition XrdOucTList.hh:42
Definition XrdSysPthread.hh:165
Definition XrdSysPthread.hh:494
CmsReqCode
Definition YProtocol.hh:90