dmlite  0.6
Public Types | Public Member Functions | Public Attributes
dmlite::Replica Struct Reference

File replica metadata. More...

#include <inode.h>

Inheritance diagram for dmlite::Replica:
Inheritance graph
[legend]
Collaboration diagram for dmlite::Replica:
Collaboration graph
[legend]

List of all members.

Public Types

enum  ReplicaStatus { kAvailable = '-', kBeingPopulated = 'P', kToBeDeleted = 'D' }
enum  ReplicaType { kVolatile = 'V', kPermanent = 'P' }
- Public Types inherited from dmlite::Extensible
typedef DictType_::const_iterator const_iterator
 Iterators.

Public Member Functions

bool operator== (const Replica &) const
bool operator!= (const Replica &) const
bool operator< (const Replica &) const
bool operator> (const Replica &) const
- Public Member Functions inherited from dmlite::Extensible
bool hasField (const std::string &key) const
 Returns true if there is a field name "key".
const boost::any & operator[] (const std::string &key) const throw (DmException)
boost::any & operator[] (const std::string &key)
bool operator== (const Extensible &) const
bool operator!= (const Extensible &) const
bool operator> (const Extensible &) const
bool operator< (const Extensible &) const
unsigned long size () const
 Number of elements inside this Extensible.
void clear ()
 Removes all the content.
void copy (const Extensible &s)
 Copies the content from another Extensible.
void erase (const std::string &)
 Removes an entry.
std::string serialize (void) const
 Serializes to JSON. In principle, it only supports POD.
void deserialize (const std::string &serial) throw (DmException)
 Deserializes from a JSON string.
std::vector< std::string > getKeys (void) const throw (DmException)
 Get all the keys available.
bool getBool (const std::string &key, bool defaultValue=false) const throw (DmException)
 Gets a boolean. May be able to perform some conversions.
long getLong (const std::string &key, long defaultValue=0) const throw (DmException)
 Gets an integer. May be able to perform some conversions.
unsigned long getUnsigned (const std::string &key, unsigned long defaultValue=0) const throw (DmException)
 Gets an unsigned integer. May be able to perform some conversions.
double getDouble (const std::string &key, double defaultValue=0) const throw (DmException)
 Gets a float. May be able to perform some conversions.
std::string getString (const std::string &key, const std::string &defaultValue="") const throw (DmException)
 Gets a string. May perform some conversions.
Extensible getExtensible (const std::string &key, const Extensible &defaultValue=Extensible()) const throw (DmException)
 Gets a nested dictionary.
std::vector< boost::any > getVector (const std::string &key, const std::vector< boost::any > &defaultValue=std::vector< boost::any >()) const throw (DmException)
 Gets an array.
const_iterator begin () const
const_iterator end () const

Public Attributes

int64_t replicaid
int64_t fileid
int64_t nbaccesses
time_t atime
time_t ptime
time_t ltime
ReplicaStatus status
ReplicaType type
std::string server
std::string rfn

Additional Inherited Members

- Static Public Member Functions inherited from dmlite::Extensible
static bool anyToBoolean (const boost::any &any)
 Converts an any to a boolean, casting if needed.
static unsigned anyToUnsigned (const boost::any &any)
 Converts an any to an unsigned, casting if needed.
static long anyToLong (const boost::any &any)
 Converts an any to a long, casting if needed.
static double anyToDouble (const boost::any &any)
 Converts an any to a double, casting if needed.
static std::string anyToString (const boost::any &any)
 Converts an any to a string, casting if needed.

Detailed Description

File replica metadata.


Member Enumeration Documentation

Enumerator:
kAvailable 
kBeingPopulated 
kToBeDeleted 
Enumerator:
kVolatile 
kPermanent 

Member Function Documentation

bool dmlite::Replica::operator!= ( const Replica ) const
bool dmlite::Replica::operator< ( const Replica ) const
bool dmlite::Replica::operator== ( const Replica ) const
bool dmlite::Replica::operator> ( const Replica ) const

Member Data Documentation

time_t dmlite::Replica::atime
int64_t dmlite::Replica::fileid
time_t dmlite::Replica::ltime
int64_t dmlite::Replica::nbaccesses
time_t dmlite::Replica::ptime
int64_t dmlite::Replica::replicaid
std::string dmlite::Replica::rfn
std::string dmlite::Replica::server
ReplicaStatus dmlite::Replica::status
ReplicaType dmlite::Replica::type

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