xrootd
Loading...
Searching...
No Matches
XrdRmc.hh
Go to the documentation of this file.
1#ifndef __XRDRMC_HH__
2#define __XRDRMC_HH__
3/******************************************************************************/
4/* */
5/* X r d R m c . h h */
6/* */
7/* (c) 2019 by the Board of Trustees of the Leland Stanford, Jr., University */
8/* All Rights Reserved */
9/* Produced by Andrew Hanushevsky for Stanford University under contract */
10/* DE-AC02-76-SFO0515 with the Department of Energy */
11/* */
12/* This file is part of the XRootD software suite. */
13/* */
14/* XRootD is free software: you can redistribute it and/or modify it under */
15/* the terms of the GNU Lesser General Public License as published by the */
16/* Free Software Foundation, either version 3 of the License, or (at your */
17/* option) any later version. */
18/* */
19/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
20/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
21/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
22/* License for more details. */
23/* */
24/* You should have received a copy of the GNU Lesser General Public License */
25/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
26/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
27/* */
28/* The copyright holder's institutional names and contributor's names may not */
29/* be used to endorse or promote products derived from this software without */
30/* specific prior written permission of the institution or contributor. */
31/******************************************************************************/
32
33#include "XrdOuc/XrdOucCache.hh"
34
92class XrdRmc
93{
94public:
95
96//-----------------------------------------------------------------------------
98//-----------------------------------------------------------------------------
99
100struct Parms
101 {long long CacheSize;
106 short minPages;
107 short Reserve1;
109
110 Parms() : CacheSize(104857600), PageSize(32768),
111 Max2Cache(0), MaxFiles(0), Options(0),
112 minPages(0), Reserve1(0), Reserve2(0) {}
113 };
114
115// Valid option values in Parms::Options
116//
117static const int
118isServer = 0x0010;
119 // Appropriate internal optimizations will be used.
120static const int
121isStructured = 0x0020; // Optimize for structured files (e.g. root).
122
123static const int
124canPreRead = 0x0040;
125
126static const int
127logStats = 0x0080;
128
129static const int
130Serialized = 0x0004;
131
132static const int
133ioMTSafe = 0x0008;
134
135static const int
136Debug = 0x0003;
137
138//-----------------------------------------------------------------------------
146//-----------------------------------------------------------------------------
147
149
152};
153#endif
Definition XrdOucCache.hh:495
Definition XrdRmc.hh:93
static const int Debug
Produce some debug messages (levels 0, 1, 2, or 3)
Definition XrdRmc.hh:136
static const int Serialized
Caller ensures MRSW semantics.
Definition XrdRmc.hh:130
~XrdRmc()
Definition XrdRmc.hh:151
static const int ioMTSafe
CacheIO object is MT-safe.
Definition XrdRmc.hh:133
XrdRmc()
Definition XrdRmc.hh:150
static XrdOucCache * Create(Parms &Params, XrdOucCacheIO::aprParms *aprP=0)
static const int logStats
Display statistics upon detach.
Definition XrdRmc.hh:127
static const int isServer
This is server application; not a user application.
Definition XrdRmc.hh:118
static const int isStructured
Definition XrdRmc.hh:121
static const int canPreRead
Enable pre-read operations (o/w ignored)
Definition XrdRmc.hh:124
Definition XrdOucCache.hh:291
Parameters for a newly created memory cache.
Definition XrdRmc.hh:101
int MaxFiles
Maximum number of files (default 256 or 8K)
Definition XrdRmc.hh:104
int PageSize
Size of each page in bytes (default 32KB)
Definition XrdRmc.hh:102
long long CacheSize
Size of cache in bytes (default 100MB)
Definition XrdRmc.hh:101
int Max2Cache
Largest read to cache (default PageSize)
Definition XrdRmc.hh:103
int Reserve2
Reserved for future use.
Definition XrdRmc.hh:108
short Reserve1
Reserved for future use.
Definition XrdRmc.hh:107
short minPages
Minimum number of pages (default 256)
Definition XrdRmc.hh:106
Parms()
Definition XrdRmc.hh:110
int Options
Options as defined below (default r/o cache)
Definition XrdRmc.hh:105