dmlite::DummyCatalog Class Reference

#include <DummyCatalog.h>

Inherits dmlite::Catalog.

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

List of all members.

Public Member Functions

 DummyCatalog (Catalog *decorated) throw (DmException)
virtual ~DummyCatalog ()
 Destructor.
virtual void setStackInstance (StackInstance *) throw (DmException)
virtual void setSecurityContext (const SecurityContext *) throw (DmException)
 Set the security context.
virtual void changeDir (const std::string &) throw (DmException)
virtual std::string getWorkingDir (void) throw (DmException)
virtual ExtendedStat extendedStat (const std::string &, bool) throw (DmException)
virtual void addReplica (const Replica &) throw (DmException)
virtual void deleteReplica (const Replica &) throw (DmException)
virtual std::vector< ReplicagetReplicas (const std::string &) throw (DmException)
virtual void symlink (const std::string &, const std::string &) throw (DmException)
std::string readLink (const std::string &path) throw (DmException)
virtual void unlink (const std::string &) throw (DmException)
virtual void create (const std::string &, mode_t) throw (DmException)
virtual mode_t umask (mode_t) throw ()
virtual void setMode (const std::string &, mode_t) throw (DmException)
virtual void setOwner (const std::string &, uid_t, gid_t, bool) throw (DmException)
virtual void setSize (const std::string &, size_t) throw (DmException)
virtual void setChecksum (const std::string &, const std::string &, const std::string &) throw (DmException)
virtual void setAcl (const std::string &, const Acl &) throw (DmException)
virtual void utime (const std::string &, const struct utimbuf *) throw (DmException)
virtual std::string getComment (const std::string &) throw (DmException)
virtual void setComment (const std::string &, const std::string &) throw (DmException)
virtual void setGuid (const std::string &, const std::string &) throw (DmException)
virtual void updateExtendedAttributes (const std::string &, const Extensible &) throw (DmException)
virtual DirectoryopenDir (const std::string &) throw (DmException)
virtual void closeDir (Directory *) throw (DmException)
virtual struct dirent * readDir (Directory *) throw (DmException)
virtual ExtendedStatreadDirx (Directory *) throw (DmException)
virtual void makeDir (const std::string &, mode_t) throw (DmException)
virtual void rename (const std::string &, const std::string &) throw (DmException)
virtual void removeDir (const std::string &) throw (DmException)
virtual Replica getReplica (const std::string &rfn) throw (DmException)
virtual void updateReplica (const Replica &replica) throw (DmException)

Protected Attributes

Catalogdecorated_

Constructor & Destructor Documentation

DummyCatalog::DummyCatalog ( Catalog decorated  )  throw (DmException)

Constructor

Parameters:
decorated The underlying decorated catalog.
DummyCatalog::~DummyCatalog (  )  [virtual]

Destructor.


Member Function Documentation

void DummyCatalog::addReplica ( const Replica replica  )  throw (DmException) [virtual]

Add a new replica for a file.

Parameters:
replica Stores the data that is going to be added. fileid must point to the id of the logical file in the catalog.

Implements dmlite::Catalog.

void DummyCatalog::changeDir ( const std::string &  path  )  throw (DmException) [virtual]

Change the working dir. Future not-absolute paths will use this as root.

Parameters:
path The new working dir.

Implements dmlite::Catalog.

void DummyCatalog::closeDir ( Directory dir  )  throw (DmException) [virtual]

Close a directory opened previously.

Parameters:
dir The directory handle as returned by NsInterface::openDir.

Implements dmlite::Catalog.

void DummyCatalog::create ( const std::string &  path,
mode_t  mode 
) throw (DmException) [virtual]

Creates an entry in the catalog.

Parameters:
path The new file.
mode The creation mode.

Implements dmlite::Catalog.

void DummyCatalog::deleteReplica ( const Replica replica  )  throw (DmException) [virtual]

Delete a replica.

Parameters:
replica The replica to remove.

Implements dmlite::Catalog.

ExtendedStat DummyCatalog::extendedStat ( const std::string &  path,
bool  followSym 
) throw (DmException) [virtual]

Do an extended stat of a file or directory.

Parameters:
path The path of the file or directory.
followSym If true, symlinks will be followed.
Returns:
The extended status of the file.

Implements dmlite::Catalog.

std::string DummyCatalog::getComment ( const std::string &  path  )  throw (DmException) [virtual]

Get the comment associated with a file.

Parameters:
path The file or directory.
Returns:
The associated comment.

Implements dmlite::Catalog.

Replica DummyCatalog::getReplica ( const std::string &  rfn  )  throw (DmException) [virtual]

Get a replica.

Parameters:
rfn The replica file name.

Implements dmlite::Catalog.

std::vector< Replica > DummyCatalog::getReplicas ( const std::string &  path  )  throw (DmException) [virtual]

Get replicas for a file.

Parameters:
path The file for which replicas will be retrieved.

Implements dmlite::Catalog.

std::string DummyCatalog::getWorkingDir ( void   )  throw (DmException) [virtual]

Get the current working dir.

Returns:
The current working dir.

Implements dmlite::Catalog.

void DummyCatalog::makeDir ( const std::string &  path,
mode_t  mode 
) throw (DmException) [virtual]

Create a new empty directory.

Parameters:
path The path of the new directory.
mode The creation mode.

Implements dmlite::Catalog.

Directory * DummyCatalog::openDir ( const std::string &  path  )  throw (DmException) [virtual]

Open a directory for reading.

Parameters:
path The directory to open.
Returns:
A pointer to a handle that can be used for later calls.

Implements dmlite::Catalog.

struct dirent * DummyCatalog::readDir ( Directory dir  )  throw (DmException) [read, virtual]

Read next entry from a directory (simple read).

Parameters:
dir The directory handle as returned by NsInterface::openDir.
Returns:
0x00 on failure or end of directory.

Implements dmlite::Catalog.

ExtendedStat * DummyCatalog::readDirx ( Directory dir  )  throw (DmException) [virtual]

Read next entry from a directory (stat information added).

Parameters:
dir The directory handle as returned by NsInterface::openDir.
Returns:
0x00 on failure (and errno is set) or end of directory.

Implements dmlite::Catalog.

std::string DummyCatalog::readLink ( const std::string &  path  )  throw (DmException) [virtual]

Returns the path pointed by the symlink path

Parameters:
path The symlink file.
Returns:
The symlink target.

Implements dmlite::Catalog.

void DummyCatalog::removeDir ( const std::string &  path  )  throw (DmException) [virtual]

Remove a directory.

Parameters:
path The path of the directory to remove.

Implements dmlite::Catalog.

void DummyCatalog::rename ( const std::string &  oldPath,
const std::string &  newPath 
) throw (DmException) [virtual]

Rename a file or directory.

Parameters:
oldPath The old name.
newPath The new name.

Implements dmlite::Catalog.

void DummyCatalog::setAcl ( const std::string &  path,
const Acl acl 
) throw (DmException) [virtual]

Set the ACLs

Parameters:
path The file to modify.
acl The Access Control List.

Implements dmlite::Catalog.

void DummyCatalog::setChecksum ( const std::string &  path,
const std::string &  csumtype,
const std::string &  csumvalue 
) throw (DmException) [virtual]

Set the checksum of a file.

Parameters:
path The file to modify.
csumtype The checksum type (CS, AD or MD).
csumvalue The checksum value.

Implements dmlite::Catalog.

void DummyCatalog::setComment ( const std::string &  path,
const std::string &  comment 
) throw (DmException) [virtual]

Set the comment associated with a file.

Parameters:
path The file or directory.
comment The new comment.

Implements dmlite::Catalog.

void DummyCatalog::setGuid ( const std::string &  path,
const std::string &  guid 
) throw (DmException) [virtual]

Set GUID of a file.

Parameters:
path The file.
guid The new GUID.

Implements dmlite::Catalog.

void DummyCatalog::setMode ( const std::string &  path,
mode_t  mode 
) throw (DmException) [virtual]

Set the mode of a file.

Parameters:
path The file to modify.
mode The new mode as an integer (i.e. 0755)

Implements dmlite::Catalog.

void DummyCatalog::setOwner ( const std::string &  path,
uid_t  newUid,
gid_t  newGid,
bool  followSymLink 
) throw (DmException) [virtual]

Set the owner of a file.

Parameters:
path The file to modify.
newUid The uid of the new owneer.
newGid The gid of the new group.
followSymLink If set to true, symbolic links will be followed.

Implements dmlite::Catalog.

void DummyCatalog::setSecurityContext ( const SecurityContext ctx  )  throw (DmException) [virtual]

Set the security context.

Implements dmlite::BaseInterface.

void DummyCatalog::setSize ( const std::string &  path,
size_t  newSize 
) throw (DmException) [virtual]

Set the size of a file.

Parameters:
path The file to modify.
newSize The new file size.

Implements dmlite::Catalog.

void DummyCatalog::setStackInstance ( StackInstance si  )  throw (DmException) [virtual]

Set the StackInstance. Some plugins may need to access other stacks (i.e. the pool may need the catalog) However, at construction time not all the stacks have been populated, so this will be called once all are instantiated.

Implements dmlite::BaseInterface.

void DummyCatalog::symlink ( const std::string &  path,
const std::string &  symlink 
) throw (DmException) [virtual]

Creates a new symlink.

Parameters:
path The existing path.
symlink The new access path.

Implements dmlite::Catalog.

mode_t DummyCatalog::umask ( mode_t  mask  )  throw () [virtual]

Sets the calling process’s file mode creation mask to mask & 0777.

Parameters:
mask The new mask.
Returns:
The value of the previous mask.

Implements dmlite::Catalog.

void DummyCatalog::unlink ( const std::string &  path  )  throw (DmException) [virtual]

Remove a file.

Parameters:
path The path to remove.

Implements dmlite::Catalog.

void DummyCatalog::updateExtendedAttributes ( const std::string &  path,
const Extensible attr 
) throw (DmException) [virtual]

Update extended metadata on the catalog.

Parameters:
path The file to update.
attr The extended attributes struct.

Implements dmlite::Catalog.

void DummyCatalog::updateReplica ( const Replica replica  )  throw (DmException) [virtual]

Update a replica.

Parameters:
replica The replica to modify.
Returns:
0 on success, error code otherwise.

Implements dmlite::Catalog.

void DummyCatalog::utime ( const std::string &  path,
const struct utimbuf *  buf 
) throw (DmException) [virtual]

Set access and/or modification time.

Parameters:
path The file path.
buf A struct holding the new times.

Implements dmlite::Catalog.


Member Data Documentation


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

Generated on 9 Oct 2012 for dmlite by  doxygen 1.6.1