xrootd
XrdFileCacheDecision.hh
Go to the documentation of this file.
1 #ifndef __XRDFILECACHE_DECISION_HH__
2 #define __XRDFILECACHE_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 #include <iostream>
23 #include <stdio.h>
24 #include "XrdOss/XrdOss.hh"
25 
26 class XrdSysError;
27 
28 namespace XrdFileCache
29 {
30 //----------------------------------------------------------------------------
32 //----------------------------------------------------------------------------
33 class Decision
34 {
35 public:
36  //--------------------------------------------------------------------------
38  //--------------------------------------------------------------------------
39  virtual ~Decision() {}
40 
41  //---------------------------------------------------------------------
48  //---------------------------------------------------------------------
49  virtual bool Decide(const std::string &, XrdOss &) const = 0;
50 
51  //------------------------------------------------------------------------------
57  //------------------------------------------------------------------------------
58  virtual bool ConfigDecision(const char* params)
59  {
60  (void) params;
61  return true;
62  }
63 };
64 }
65 
66 #endif
67 
Definition: XrdSysError.hh:89
virtual ~Decision()
Destructor.
Definition: XrdFileCacheDecision.hh:39
Definition: XrdOss.hh:173
virtual bool ConfigDecision(const char *params)
Definition: XrdFileCacheDecision.hh:58
Base class for selecting which files should be cached.
Definition: XrdFileCacheDecision.hh:33
virtual bool Decide(const std::string &, XrdOss &) const =0