XRootD
XrdPfcAllowDecision.cc
Go to the documentation of this file.
1 //----------------------------------------------------------------------------------
2 // Copyright (c) 2014 by Board of Trustees of the Leland Stanford, Jr., University
3 // Author: Alja Mrak-Tadel, Matevz Tadel, Brian Bockelman
4 //----------------------------------------------------------------------------------
5 // XRootD is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU Lesser General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // XRootD is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with XRootD. If not, see <http://www.gnu.org/licenses/>.
17 //----------------------------------------------------------------------------------
18 
19 #include "XrdPfcDecision.hh"
20 #include "XrdSys/XrdSysError.hh"
21 
22 
24 {
25 //----------------------------------------------------------------------------
27 //----------------------------------------------------------------------------
28 
29 public:
30 virtual bool Decide(std::string &, XrdOss &) const {return true; }
31 
32 };
33 
34 /******************************************************************************/
35 /* XrdPfcGetDecision */
36 /******************************************************************************/
37 
38 // Return a decision object to use.
39 extern "C"
40 {
42 {
43  return new AllowDecision();
44 }
45 }
XrdPfc::Decision * XrdPfcGetDecision(XrdSysError &)
virtual bool Decide(std::string &, XrdOss &) const
The simplest example of plugin - always allow the file to be prefetched.
Base class for selecting which files should be cached.