dmlite::INode Class Reference

#include <inode.h>

Inherits dmlite::BaseInterface.

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

List of all members.

Public Member Functions

virtual ~INode ()
 Destructor.
virtual void begin (void) throw (DmException)
 Start a transaction.
virtual void commit (void) throw (DmException)
 Commit a transaction.
virtual void rollback (void) throw (DmException)
 Rollback changes.
virtual ExtendedStat create (const ExtendedStat &f) throw (DmException)
virtual void symlink (ino_t inode, const std::string &link) throw (DmException)
virtual void unlink (ino_t inode) throw (DmException)
virtual void move (ino_t inode, ino_t dest) throw (DmException)
virtual void rename (ino_t inode, const std::string &name) throw (DmException)
virtual ExtendedStat extendedStat (ino_t inode) throw (DmException)
virtual DmStatus extendedStat (ExtendedStat &xstat, ino_t inode) throw (DmException)
virtual ExtendedStat extendedStat (ino_t parent, const std::string &name) throw (DmException)
virtual DmStatus extendedStat (ExtendedStat &xstat, ino_t parent, const std::string &name) throw (DmException)
virtual ExtendedStat extendedStat (const std::string &guid) throw (DmException)
virtual SymLink readLink (ino_t inode) throw (DmException)
virtual void addReplica (const Replica &replica) throw (DmException)
virtual void deleteReplica (const Replica &replica) throw (DmException)
virtual Replica getReplica (int64_t rid) throw (DmException)
virtual Replica getReplica (const std::string &rfn) throw (DmException)
virtual void updateReplica (const Replica &replica) throw (DmException)
virtual std::vector< ReplicagetReplicas (ino_t inode) throw (DmException)
virtual void utime (ino_t inode, const struct utimbuf *buf) throw (DmException)
virtual void setMode (ino_t inode, uid_t uid, gid_t gid, mode_t mode, const Acl &acl) throw (DmException)
virtual void setSize (ino_t inode, size_t size) throw (DmException)
virtual void setChecksum (ino_t inode, const std::string &csumtype, const std::string &csumvalue) throw (DmException)
virtual std::string getComment (ino_t inode) throw (DmException)
virtual void setComment (ino_t inode, const std::string &comment) throw (DmException)
virtual void deleteComment (ino_t inode) throw (DmException)
virtual void setGuid (ino_t inode, const std::string &guid) throw (DmException)
virtual void updateExtendedAttributes (ino_t inode, const Extensible &attr) throw (DmException)
virtual IDirectoryopenDir (ino_t inode) throw (DmException)
virtual void closeDir (IDirectory *dir) throw (DmException)
virtual ExtendedStatreadDirx (IDirectory *dir) throw (DmException)
virtual struct dirent * readDir (IDirectory *dir) throw (DmException)

Detailed Description

Low-level interface. Based on i-nodes.

Note:
Security checks NOT done on this level.

Constructor & Destructor Documentation

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

Destructor.


Member Function Documentation

virtual void dmlite::INode::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.
virtual void dmlite::INode::begin ( void   )  throw (DmException) [virtual]

Start a transaction.

virtual void dmlite::INode::closeDir ( IDirectory dir  )  throw (DmException) [virtual]

Close a directory.

Parameters:
dir The opaque structure to close.
virtual void dmlite::INode::commit ( void   )  throw (DmException) [virtual]

Commit a transaction.

virtual ExtendedStat dmlite::INode::create ( const ExtendedStat f  )  throw (DmException) [virtual]

Create a new file or directory

Parameters:
f The file that will be inserted. Its fields must be initialized.
Returns:
An stat of the created file.
virtual void dmlite::INode::deleteComment ( ino_t  inode  )  throw (DmException) [virtual]

Remove the associated comment.

Parameters:
inode The file whose comment will be removed.
virtual void dmlite::INode::deleteReplica ( const Replica replica  )  throw (DmException) [virtual]

Delete a replica.

Parameters:
replica The replica to remove.
virtual ExtendedStat dmlite::INode::extendedStat ( const std::string &  guid  )  throw (DmException) [virtual]

Do an extended stat using the GUID.

Parameters:
guid The file GUID.
virtual DmStatus dmlite::INode::extendedStat ( ExtendedStat xstat,
ino_t  parent,
const std::string &  name 
) throw (DmException) [virtual]

Do an extended stat of an entry using the parent inode and the name, exception-safe version.

Parameters:
xstat The extended status of the file.
parent The parent inode.
name The file or directory name.
Returns:
The status of the operation.
Note:
No security check will be done.
virtual ExtendedStat dmlite::INode::extendedStat ( ino_t  parent,
const std::string &  name 
) throw (DmException) [virtual]

Do an extended stat of an entry using the parent inode and the name.

Parameters:
parent The parent inode.
name The file or directory name.
Note:
No security check will be done.
virtual DmStatus dmlite::INode::extendedStat ( ExtendedStat xstat,
ino_t  inode 
) throw (DmException) [virtual]

Do an extended stat of an entry using its inode, exception-safe version.

Parameters:
xstat The extended status of the file.
inode The inode of the file.
Returns:
The status of the operation.
virtual ExtendedStat dmlite::INode::extendedStat ( ino_t  inode  )  throw (DmException) [virtual]

Do an extended stat of an entry using its inode.

Parameters:
inode The inode of the file.
Returns:
The extended status of the file.
virtual std::string dmlite::INode::getComment ( ino_t  inode  )  throw (DmException) [virtual]

Get the comment associated to a file.

Parameters:
inode The inode of the file.
Returns:
The comment.
virtual Replica dmlite::INode::getReplica ( const std::string &  rfn  )  throw (DmException) [virtual]

Get a replica.

Parameters:
rfn The replica to retrieve.
virtual Replica dmlite::INode::getReplica ( int64_t  rid  )  throw (DmException) [virtual]

Get a replica using the replica ID.

Parameters:
rid The replica ID.
virtual std::vector<Replica> dmlite::INode::getReplicas ( ino_t  inode  )  throw (DmException) [virtual]

Get replicas for a file.

Parameters:
inode The entry inode.
virtual void dmlite::INode::move ( ino_t  inode,
ino_t  dest 
) throw (DmException) [virtual]

Move a file between two directories.

Parameters:
inode File to be moved.
dest The new parent.
virtual IDirectory* dmlite::INode::openDir ( ino_t  inode  )  throw (DmException) [virtual]

Open a directory.

Parameters:
inode The inode of the directory.
Returns:
An opaque pointer to a directory.
virtual struct dirent* dmlite::INode::readDir ( IDirectory dir  )  throw (DmException) [read, virtual]

Read the next entry.

Parameters:
dir The opaque structure of a directory.
Returns:
NULL when finished. Extended stat of the next entry otherwise.
virtual ExtendedStat* dmlite::INode::readDirx ( IDirectory dir  )  throw (DmException) [virtual]

Read the next entry.

Parameters:
dir The opaque structure of a directory.
Returns:
NULL when finished. Extended stat of the next entry otherwise.
virtual SymLink dmlite::INode::readLink ( ino_t  inode  )  throw (DmException) [virtual]

Get the symlink associated with a inode.

Parameters:
inode The inode of the file.
Returns:
A SymLink struct.
Note:
If inode is not a symlink, an exception will be thrown.
virtual void dmlite::INode::rename ( ino_t  inode,
const std::string &  name 
) throw (DmException) [virtual]

Change the name of a file.

Parameters:
inode The inode of the file.
name New name.
virtual void dmlite::INode::rollback ( void   )  throw (DmException) [virtual]

Rollback changes.

virtual void dmlite::INode::setChecksum ( ino_t  inode,
const std::string &  csumtype,
const std::string &  csumvalue 
) throw (DmException) [virtual]

Set the checksum of a file.

Parameters:
inode The inode of the file.
csumtype The checksum type.
csumvalue The checksum value.
virtual void dmlite::INode::setComment ( ino_t  inode,
const std::string &  comment 
) throw (DmException) [virtual]

Set the comment associated to a file.

Parameters:
inode The inode of the file.
comment The new comment.
virtual void dmlite::INode::setGuid ( ino_t  inode,
const std::string &  guid 
) throw (DmException) [virtual]

Set the GUID of a file.

Parameters:
inode The inode of the file.
guid The new GUID.
virtual void dmlite::INode::setMode ( ino_t  inode,
uid_t  uid,
gid_t  gid,
mode_t  mode,
const Acl acl 
) throw (DmException) [virtual]

Set the mode of a file.

Parameters:
inode The inode of the file.
uid The owner. If -1, not changed.
gid The group. If -1, not changed.
mode The new mode. S_IFMT bits are cleared, and kept as they are in the DB.
acl The new ACL. If empty, not changed.
virtual void dmlite::INode::setSize ( ino_t  inode,
size_t  size 
) throw (DmException) [virtual]

Set the size of a file.

Parameters:
inode The inode of the file.
size The new size.
virtual void dmlite::INode::symlink ( ino_t  inode,
const std::string &  link 
) throw (DmException) [virtual]

Create or modify the file inode to point to another file.

Parameters:
inode The file to modify.
link The new symbolic link.
Note:
This does NOT create the file. Use create first.
virtual void dmlite::INode::unlink ( ino_t  inode  )  throw (DmException) [virtual]

Remove a file or directory. It will fail if it is a directory and it is not empty, or if it a file and it has replicas.

Parameters:
inode The inode of the file.
Note:
This will check for non empty directories.
This will remove associated comments and replicas.
virtual void dmlite::INode::updateExtendedAttributes ( ino_t  inode,
const Extensible attr 
) throw (DmException) [virtual]

Update extended metadata on the catalog.

Parameters:
attr The extended attributes struct.
virtual void dmlite::INode::updateReplica ( const Replica replica  )  throw (DmException) [virtual]

Modify a replica.

Parameters:
replica The replica data.
virtual void dmlite::INode::utime ( ino_t  inode,
const struct utimbuf *  buf 
) throw (DmException) [virtual]

Change access and/or modification time.

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

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

Generated on 31 Aug 2018 for dmlite by  doxygen 1.6.1