XRootD
Loading...
Searching...
No Matches
XrdPfcDecision.hh
Go to the documentation of this file.
1#ifndef __XRDPFC_DECISION_HH__
2#define __XRDPFC_DECISION_HH__
3//----------------------------------------------------------------------------------
4// Copyright (c) 2014 by Board of Trustees of the Leland Stanford, Jr., University
5// Author: Alja Mrak-Tadel, Matevz Tadel, Brian Bockelman
6//----------------------------------------------------------------------------------
7// XRootD is free software: you can redistribute it and/or modify
8// it under the terms of the GNU Lesser General Public License as published by
9// the Free Software Foundation, either version 3 of the License, or
10// (at your option) any later version.
11//
12// XRootD is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16//
17// You should have received a copy of the GNU Lesser General Public License
18// along with XRootD. If not, see <http://www.gnu.org/licenses/>.
19//----------------------------------------------------------------------------------
20
21#include <string>
22
23class XrdOss;
24class XrdSysError;
25
26namespace XrdPfc
27{
28//----------------------------------------------------------------------------
30//----------------------------------------------------------------------------
32{
33public:
34 //--------------------------------------------------------------------------
36 //--------------------------------------------------------------------------
37 virtual ~Decision() {}
38
39 //---------------------------------------------------------------------
46 //---------------------------------------------------------------------
47 virtual bool Decide(const std::string &, XrdOss &) const = 0;
48
49 //------------------------------------------------------------------------------
55 //------------------------------------------------------------------------------
56 virtual bool ConfigDecision(const char* params)
57 {
58 (void) params;
59 return true;
60 }
61};
62}
63
64#endif
65
Base class for selecting which files should be cached.
virtual bool ConfigDecision(const char *params)
virtual ~Decision()
Destructor.
virtual bool Decide(const std::string &, XrdOss &) const =0