Loading...
Searching...
No Matches
XrdCmsBlackList.hh
Go to the documentation of this file.
#ifndef __XRDCMSBLACKLIST_HH__
#define __XRDCMSBLACKLIST_HH__
/******************************************************************************/
/* */
/* X r d C m s B l a c k L i s t . h h */
/* */
/* (c) 2014 by the Board of Trustees of the Leland Stanford, Jr., University */
/* All Rights Reserved */
/* Produced by Andrew Hanushevsky for Stanford University under contract */
/* DE-AC02-76-SFO0515 with the Department of Energy */
/* */
/* This file is part of the XRootD software suite. */
/* */
/* XRootD is free software: you can redistribute it and/or modify it under */
/* the terms of the GNU Lesser General Public License as published by the */
/* Free Software Foundation, either version 3 of the License, or (at your */
/* option) any later version. */
/* */
/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
/* License for more details. */
/* */
/* You should have received a copy of the GNU Lesser General Public License */
/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
/* */
/* The copyright holder's institutional names and contributor's names may not */
/* be used to endorse or promote products derived from this software without */
/* specific prior written permission of the institution or contributor. */
/******************************************************************************/
#include "Xrd/XrdJob.hh"
class XrdCmsCluster;
class XrdOucTList;
class XrdScheduler;
class BL_Grip;
class XrdCmsBlackList : public XrdJob
{
public:
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void DoIt();
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
static void Init(XrdScheduler *sP, XrdCmsCluster *cP,
const char *blfn, int chkt=600);
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
static int Present(const char *hName, XrdOucTList *bList=0,
char *rbuff=0, int rblen=0);
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
XrdCmsBlackList() : XrdJob("Black List Check") {}
~XrdCmsBlackList() {}
private:
static bool AddBL(BL_Grip &bAnchor, char *hSpec,
BL_Grip *rAnchor, char *rSpec);
static int AddRD(BL_Grip *rAnchor, char *rSpec, char *hSpec);
static bool AddRD(XrdOucTList **rList, char *rSpec, char *hSpec);
static
XrdOucTList *Flatten(XrdOucTList *tList, int tPort);
static bool GetBL(XrdOucTList *&bList, XrdOucTList **&rList, int &rcnt, bool isInit = false);
};
#endif
XrdJob.hh
BL_Grip
Definition XrdCmsBlackList.cc:59
XrdCmsBlackList::DoIt
void DoIt()
Time driven method for checking black list file.
Definition XrdCmsBlackList.cc:295
XrdCmsBlackList::Present
static int Present(const char *hName, XrdOucTList *bList=0, char *rbuff=0, int rblen=0)
Definition XrdCmsBlackList.cc:515
XrdCmsBlackList::XrdCmsBlackList
XrdCmsBlackList()
Constructor and Destructor.
Definition XrdCmsBlackList.hh:91
XrdCmsBlackList::Init
static void Init(XrdScheduler *sP, XrdCmsCluster *cP, const char *blfn, int chkt=600)
Definition XrdCmsBlackList.cc:467
XrdCmsBlackList::~XrdCmsBlackList
~XrdCmsBlackList()
Definition XrdCmsBlackList.hh:92
XrdCmsCluster
Definition XrdCmsCluster.hh:115
XrdJob::XrdScheduler
friend class XrdScheduler
Definition XrdJob.hh:44
XrdJob::XrdJob
XrdJob(const char *desc="")
Definition XrdJob.hh:51
XrdOucTList
Definition XrdOucTList.hh:42
XrdScheduler
Definition XrdScheduler.hh:47