xrootd
Loading...
Searching...
No Matches
XrdSsiCms.hh
Go to the documentation of this file.
1#ifndef __XRDSSICMS_H__
2#define __XRDSSICMS_H__
3/******************************************************************************/
4/* */
5/* X r d S s i C m s . h h */
6/* */
7/* (c) 2014 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
35
36
38{
39public:
40
41 void Added(const char *name, bool pend=false);
42
43 bool DataContext() {return true;}
44
45const char *
46const * Managers(int &mNum) {mNum = manNum; return manList;}
47
48 void Removed(const char *name);
49
50 void Resume (bool perm=true)
51 {if (theCms) theCms->Resume(perm);}
52
53 void Suspend(bool perm=true)
54 {if (theCms) theCms->Suspend(perm);}
55
56 int Resource(int n)
57 {if (theCms) return theCms->Resource(n);
58 return 0;
59 }
60
61 int Reserve (int n=1)
62 {if (theCms) return theCms->Reserve(n);
63 return 0;
64 }
65
66 int Release (int n=1)
67 {if (theCms) return theCms->Release(n);
68 return 0;
69 }
70
71 void Utilization(unsigned int util, bool alert=false)
72 {if (theCms) return theCms->Utilization(util, alert);}
73
74 XrdSsiCms() : theCms(0), manList(0), manNum(0) {}
75
77
78virtual ~XrdSsiCms();
79
80private:
81
83char **manList;
85};
86#endif
Definition XrdCmsClient.hh:116
virtual int Reserve(int n=1)
Definition XrdCmsClient.hh:303
virtual int Release(int n=1)
Definition XrdCmsClient.hh:316
virtual void Resume(int Perm=1)
Definition XrdCmsClient.hh:267
virtual int Resource(int n)
Definition XrdCmsClient.hh:291
virtual void Utilization(unsigned int util, bool alert=false)
Definition XrdCmsClient.hh:343
virtual void Suspend(int Perm=1)
Definition XrdCmsClient.hh:276
Definition XrdSsiCluster.hh:41
Definition XrdSsiCms.hh:38
bool DataContext()
Definition XrdSsiCms.hh:43
XrdSsiCms(XrdCmsClient *cmsP)
void Removed(const char *name)
virtual ~XrdSsiCms()
char ** manList
Definition XrdSsiCms.hh:83
void Suspend(bool perm=true)
Definition XrdSsiCms.hh:53
const char *const * Managers(int &mNum)
Definition XrdSsiCms.hh:46
XrdSsiCms()
Definition XrdSsiCms.hh:74
void Resume(bool perm=true)
Definition XrdSsiCms.hh:50
XrdCmsClient * theCms
Definition XrdSsiCms.hh:82
int Resource(int n)
Definition XrdSsiCms.hh:56
void Added(const char *name, bool pend=false)
void Utilization(unsigned int util, bool alert=false)
Definition XrdSsiCms.hh:71
int manNum
Definition XrdSsiCms.hh:84
int Reserve(int n=1)
Definition XrdSsiCms.hh:61
int Release(int n=1)
Definition XrdSsiCms.hh:66