XRootD
XrdOucCache.hh File Reference
#include <cerrno>
#include <cstdint>
#include <vector>
#include "XrdOuc/XrdOucCacheStats.hh"
#include "XrdOuc/XrdOucIOVec.hh"
+ Include dependency graph for XrdOucCache.hh:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  XrdOucCacheIO::aprParms
 
class  XrdOucCache
 
class  XrdOucCacheIO
 
class  XrdOucCacheIOCB
 
class  XrdOucCacheIOCD
 

Typedefs

typedef XrdOucCache *(* XrdOucCache_t) (XrdSysLogger *Logger, const char *Config, const char *Parms, XrdOucEnv *envP)
 

Typedef Documentation

◆ XrdOucCache_t

typedef XrdOucCache*(* XrdOucCache_t) (XrdSysLogger *Logger, const char *Config, const char *Parms, XrdOucEnv *envP)

Your cache plug-in must exist in a shared library and have the following extern C function defined whose parameters are:

Parameters
LoggerPointer to the logger object that should be used with an instance of XrdSysError to direct messages to a log file. If Logger is null, you should use std::cerr to output messages.
ConfigPointer to the configuration file name from where you should get additional information. If Config is null, there is no configuration file is present.
ParmsPointer to any parameters specified after the shared library path. If Parms is null, there are no parameters.
envPPointer to environmental information. The most relevant is whether or not gStream monitoring is enabled.
XrdXrootdGStream *gStream = (XrddXrootdGStream *)
envP->GetPtr("pfc.gStream*");
void * GetPtr(const char *varname)
Definition: XrdOucEnv.cc:281
XrdOucEnv * envP
Definition: XrdPss.cc:109
Returns
A usable, fully configured, instance of an XrdOucCache object upon success and a null pointer otherwise. This instance is used for all operations defined by methods in XrdOucCache base class.
extern "C"
{
const char *Config, // Config file used
const char *Parms, // Optional parm string
XrdOucEnv *envP); // Optional environment
}
XrdOucCache * XrdOucGetCache(XrdSysLogger *logger, const char *config_filename, const char *parameters, XrdOucEnv *env)
Definition: XrdPfc.cc:76
XrdCmsConfig Config
XrdSysLogger Logger
Definition: XrdGlobals.cc:47

Declare compilation version.

Additionally, you should declare the xrootd version you used to compile your plug-in. Declare it as shown below.

#include "XrdVersion.hh"
XrdVERSIONINFO(XrdOucGetCache,<name>);

where <name> is a 1- to 15-character unquoted name identifying your plugin.

Definition at line 765 of file XrdOucCache.hh.