xrootd
Loading...
Searching...
No Matches
Public Member Functions | List of all members
XrdPosixCache Class Reference

#include <XrdPosixCache.hh>

Public Member Functions

int CachePath (const char *url, char *buff, int blen)
 
int CacheQuery (const char *url, bool hold=false)
 
int Rmdir (const char *path)
 
int Rename (const char *oldPath, const char *newPath)
 
int Stat (const char *path, struct stat &sbuff)
 
void Statistics (XrdOucCacheStats &Stats)
 
int Truncate (const char *path, off_t size)
 
int Unlink (const char *path)
 
 XrdPosixCache ()
 Constructor and destructor.
 
 ~XrdPosixCache ()
 

Constructor & Destructor Documentation

◆ XrdPosixCache()

XrdPosixCache::XrdPosixCache ( )
inline

Constructor and destructor.

◆ ~XrdPosixCache()

XrdPosixCache::~XrdPosixCache ( )
inline

Member Function Documentation

◆ CachePath()

int XrdPosixCache::CachePath ( const char *  url,
char *  buff,
int  blen 
)

Convert a logical path to the path of the corresonding entry in the cache.

Parameters
url-> url of the directory or file to be converted.
buff-> buffer to receive the result.
blenThe length of the buffer (should be at least 1024).
Returns
=0 Buffer holds the result.
<0 Conversion failed, the return value is -errno.

◆ CacheQuery()

int XrdPosixCache::CacheQuery ( const char *  url,
bool  hold = false 
)

Check cache status of a file.

Parameters
url-> url of the logical file to be checked in the cache.
holdWhen true, the file purge time is extended to allow the file to be accessed before eligible for purging. When false (the default) only status information is returned.
Returns
>0 The file is fully cached.
=0 The file exists in the cache but is not fully cached.
<0 The file does not exist in the cache.

◆ Rename()

int XrdPosixCache::Rename ( const char *  oldPath,
const char *  newPath 
)

Rename a file or directory in the cache.

Parameters
oldPath-> filepath of existing directory or file.
newPath-> filepath the directory or file is to have.
Returns
0 This method is currently not supported.

◆ Rmdir()

int XrdPosixCache::Rmdir ( const char *  path)

Remove directory from the cache.

Parameters
path-> filepath of directory to be removed
Returns
0 This method is currently not supported.

◆ Stat()

int XrdPosixCache::Stat ( const char *  path,
struct stat sbuff 
)

Rename a file or directory in the cache.

Parameters
path-> filepath of existing directory or file. This is the actual path in the cache (see CachePath()).
sbuffReference to the stat structure to hold the information.
Returns
=0 The sbuff hold the information.
!0 The file or direcory does not exist in the cache.

◆ Statistics()

void XrdPosixCache::Statistics ( XrdOucCacheStats Stats)

Rename a file or directory in the cache.

Parameters
StatsReference to the statistics object to be filled in.

◆ Truncate()

int XrdPosixCache::Truncate ( const char *  path,
off_t  size 
)

Truncate a file in the cache.

Parameters
path-> filepath of file to be truncated.
sizeThe size in bytes the file should have.
Returns
0 This method is currently not supported.

◆ Unlink()

int XrdPosixCache::Unlink ( const char *  path)

Remove a file from the cache.

Parameters
path-> filepath of file to be removed.
Returns
=0 File was removed.
!0 File could not be removed, because of one of the below: -EBUSY - the file is in use. -EAGAIN - file is currently subject to internal processing. -errno - file was not removed, filesystem unlink() failed.

The documentation for this class was generated from the following file: