Loading...
Searching...
No Matches
XrdPfcAllowDecision.cc
Go to the documentation of this file.
//----------------------------------------------------------------------------------
// Copyright (c) 2014 by Board of Trustees of the Leland Stanford, Jr., University
// Author: Alja Mrak-Tadel, Matevz Tadel, Brian Bockelman
//----------------------------------------------------------------------------------
// 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 General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with XRootD. If not, see <http://www.gnu.org/licenses/>.
//----------------------------------------------------------------------------------
#include "XrdPfcDecision.hh"
#include "XrdSys/XrdSysError.hh"
class AllowDecision : public XrdPfc::Decision
{
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
public:
virtual bool Decide(std::string &, XrdOss &) const {return true; }
};
/******************************************************************************/
/* XrdPfcGetDecision */
/******************************************************************************/
// Return a decision object to use.
extern "C"
{
XrdPfc::Decision *XrdPfcGetDecision(XrdSysError &)
{
return new AllowDecision();
}
}
XrdPfcGetDecision
XrdPfc::Decision * XrdPfcGetDecision(XrdSysError &)
Definition XrdPfcAllowDecision.cc:41
XrdPfcDecision.hh
XrdSysError.hh
AllowDecision
Definition XrdPfcAllowDecision.cc:24
AllowDecision::Decide
virtual bool Decide(std::string &, XrdOss &) const
The simplest example of plugin - always allow the file to be prefetched.
Definition XrdPfcAllowDecision.cc:30
XrdOss
Definition XrdOss.hh:499
XrdPfc::Decision
Base class for selecting which files should be cached.
Definition XrdPfcDecision.hh:32
XrdSysError
Definition XrdSysError.hh:90