XRootD
XrdRmc.cc
Go to the documentation of this file.
1
/******************************************************************************/
2
/* */
3
/* X r d R m c . c c */
4
/* */
5
/* (c) 2019 by the Board of Trustees of the Leland Stanford, Jr., University */
6
/* All Rights Reserved */
7
/* Produced by Andrew Hanushevsky for Stanford University under contract */
8
/* DE-AC02-76-SFO0515 with the Department of Energy */
9
/* */
10
/* This file is part of the XRootD software suite. */
11
/* */
12
/* XRootD is free software: you can redistribute it and/or modify it under */
13
/* the terms of the GNU Lesser General Public License as published by the */
14
/* Free Software Foundation, either version 3 of the License, or (at your */
15
/* option) any later version. */
16
/* */
17
/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
18
/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
19
/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
20
/* License for more details. */
21
/* */
22
/* You should have received a copy of the GNU Lesser General Public License */
23
/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
24
/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
25
/* */
26
/* The copyright holder's institutional names and contributor's names may not */
27
/* be used to endorse or promote products derived from this software without */
28
/* specific prior written permission of the institution or contributor. */
29
/******************************************************************************/
30
31
#include <cerrno>
32
33
#include "
XrdRmc/XrdRmc.hh
"
34
#include "
XrdRmc/XrdRmcReal.hh
"
35
36
/******************************************************************************/
37
/* C r e a t e */
38
/******************************************************************************/
39
40
XrdOucCache
*
XrdRmc::Create
(
Parms
&ParmV,
XrdOucCacheIO::aprParms
*aprP)
41
{
42
XrdRmcReal
*cP;
43
int
rc;
44
45
// We simply create a new instance of a real cache and return it. We do it this
46
// way so that in the future new types of caches can be created using the same
47
// interface.
48
//
49
cP =
new
XrdRmcReal
(rc, ParmV, aprP);
50
if
(rc) {
delete
cP; cP = 0; errno = rc;}
51
return
(
XrdOucCache
*)cP;
52
}
XrdRmcReal.hh
XrdRmc.hh
XrdOucCache
Definition:
XrdOucCache.hh:495
XrdRmcReal
Definition:
XrdRmcReal.hh:40
XrdRmc::Create
static XrdOucCache * Create(Parms &Params, XrdOucCacheIO::aprParms *aprP=0)
Definition:
XrdRmc.cc:40
XrdOucCacheIO::aprParms
Definition:
XrdOucCache.hh:291
XrdRmc::Parms
Parameters for a newly created memory cache.
Definition:
XrdRmc.hh:101
XrdRmc
XrdRmc.cc
Generated by
1.9.1