dmlite::PoolManager Class Reference

Interface for pool types. More...

#include <poolmanager.h>

Inherits dmlite::BaseInterface.

Inherited by dmlite::DummyPoolManager.

Collaboration diagram for dmlite::PoolManager:
Collaboration graph
[legend]

List of all members.

Public Types

enum  PoolAvailability {
  kAny, kNone, kForRead, kForWrite,
  kForBoth
}

Public Member Functions

virtual ~PoolManager ()
 Destructor.
virtual std::vector< PoolgetPools (PoolAvailability availability=kAny)
virtual Pool getPool (const std::string &poolname)
 Get a specific pool.
virtual void newPool (const Pool &pool)
 Create a new pool.
virtual void updatePool (const Pool &pool)
 Update pool metadata.
virtual void deletePool (const Pool &pool)
 Remove a pool.
virtual Location whereToRead (const std::string &path)
virtual Location whereToRead (ino_t inode)
virtual Location whereToWrite (const std::string &path)
virtual Location chooseServer (const std::string &path)
virtual void cancelWrite (const Location &loc)
virtual void getDirSpaces (const std::string &path, int64_t &totalfree, int64_t &used)
virtual DmStatus fileCopyPush (const std::string &localsrcpath, const std::string &remotedesturl, int cksumcheck, char *cksumtype, dmlite_xferinfo *progressdata)
virtual DmStatus fileCopyPull (const std::string &localdestpath, const std::string &remotesrcurl, int cksumcheck, char *cksumtype, dmlite_xferinfo *progressdata)

Detailed Description

Interface for pool types.


Member Enumeration Documentation

Enumerator:
kAny 
kNone 
kForRead 
kForWrite 
kForBoth 

Constructor & Destructor Documentation

virtual dmlite::PoolManager::~PoolManager (  )  [virtual]

Destructor.


Member Function Documentation

virtual void dmlite::PoolManager::cancelWrite ( const Location loc  )  [virtual]

Cancel a write.

Parameters:
path The logical file name.
loc As returned by whereToWrite
virtual Location dmlite::PoolManager::chooseServer ( const std::string &  path  )  [virtual]

chooses a server to perform alternate operations e.g. tunnelling a gridftp connection

Parameters:
path A path, could be ignored, depending on the implementation
virtual void dmlite::PoolManager::deletePool ( const Pool pool  )  [virtual]

Remove a pool.

Reimplemented in dmlite::DummyPoolManager.

virtual DmStatus dmlite::PoolManager::fileCopyPull ( const std::string &  localdestpath,
const std::string &  remotesrcurl,
int  cksumcheck,
char *  cksumtype,
dmlite_xferinfo progressdata 
) [virtual]

Fetch a file from a given URL

Parameters:
localdestpath The logical name of the file to create
remotesrcurl The URL to read the file from
Returns:
0 on success, error code otherwise. EAGAIN means performance marker

Reimplemented in dmlite::DummyPoolManager.

virtual DmStatus dmlite::PoolManager::fileCopyPush ( const std::string &  localsrcpath,
const std::string &  remotedesturl,
int  cksumcheck,
char *  cksumtype,
dmlite_xferinfo progressdata 
) [virtual]

Write a logical file towards a given URL

Parameters:
localsrcpath The path of the file
remotedesturl The URL to write to
Returns:
0 on success, error code otherwise. EAGAIN means performance marker

Reimplemented in dmlite::DummyPoolManager.

virtual void dmlite::PoolManager::getDirSpaces ( const std::string &  path,
int64_t &  totalfree,
int64_t &  used 
) [virtual]

Get the estimation of the free/used space for writing into a directory

Parameters:
path The path of the directory to query
totalfree The total number of free bytes (may not be contiguous)
used The total number of used bytes
virtual Pool dmlite::PoolManager::getPool ( const std::string &  poolname  )  [virtual]

Get a specific pool.

Reimplemented in dmlite::DummyPoolManager.

virtual std::vector<Pool> dmlite::PoolManager::getPools ( PoolAvailability  availability = kAny  )  [virtual]

Get the list of pools.

Parameters:
availability Filter by availability.

Reimplemented in dmlite::DummyPoolManager.

virtual void dmlite::PoolManager::newPool ( const Pool pool  )  [virtual]

Create a new pool.

Reimplemented in dmlite::DummyPoolManager.

virtual void dmlite::PoolManager::updatePool ( const Pool pool  )  [virtual]

Update pool metadata.

Reimplemented in dmlite::DummyPoolManager.

virtual Location dmlite::PoolManager::whereToRead ( ino_t  inode  )  [virtual]

Get a location for an inode

Parameters:
inode The file inode.

Reimplemented in dmlite::DummyPoolManager.

virtual Location dmlite::PoolManager::whereToRead ( const std::string &  path  )  [virtual]

Get a location for a logical name.

Parameters:
path The path to get.

Reimplemented in dmlite::DummyPoolManager.

virtual Location dmlite::PoolManager::whereToWrite ( const std::string &  path  )  [virtual]

Start the PUT of a file.

Parameters:
path The path of the file to create.
Returns:
The physical location where to write.

Reimplemented in dmlite::DummyPoolManager.


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

Generated on 5 Nov 2020 for dmlite by  doxygen 1.6.1