Public Member Functions | Static Public Member Functions

VDRIVE::RSDisk Class Reference

#include <RSDisk.h>

Collaboration diagram for VDRIVE::RSDisk:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 RSDisk (Disk *disk)
 RSDisk (const RSDisk &orig)
virtual ~RSDisk ()
 RSDisk (xercesc::DOMElement *data)
int64_t getId ()
int64_t getCapacity ()
DiskgetDisk () const
int64_t getAlignedCapacity () const
void setAlignedCapacity (int64_t alignedCapacity)
int64_t getCPosition () const
void setCPosition (int64_t cPosition)
mpq_class getCheckC () const
void setCheckC (mpq_class checkC)
double getCheckCDouble () const
mpq_class getCheckCStar () const
void setCheckCStar (mpq_class checkCStar)
double getCheckCStarDouble () const
int32_t getKError () const
void setKError (int32_t kError)
std::string getRsId () const
void setRsId (std::string rsId)
virtual xercesc::DOMElement * toXML (xercesc::DOMDocument *doc)

Static Public Member Functions

static std::string getXMLRootType ()

Detailed Description

RSDisk is a used by RedundantShare to hold some precomputed data about a Disk. Most important is checkC used to place the Extents.

Author:
Sascha Effert <fermat@uni-paderborn.de>

Constructor & Destructor Documentation

RSDisk::RSDisk ( Disk disk )

Generate a new uninitialized RSDisk representing the given Disk.

Parameters:
diskThe disk to be represented by this RSDisk.
RSDisk::RSDisk ( const RSDisk orig )

copy constructor

Parameters:
origoriginal RSDisk
RSDisk::~RSDisk (  ) [virtual]

Destructor

RSDisk::RSDisk ( xercesc::DOMElement *  data )

Create a new instance from the data in the given XML Element.

Parameters:
dataAn XML-Element containing the description of a RSDisk.

Member Function Documentation

int64_t VDRIVE::RSDisk::getAlignedCapacity (  ) const [inline]

Get the real useable capacity.

Returns:
real useable capacity.
int64_t VDRIVE::RSDisk::getCapacity (  ) [inline]

Get the capacity of the underlying Disk

Returns:
capacity of the underlying Disk
mpq_class VDRIVE::RSDisk::getCheckC (  ) const [inline]

Get the aligned size of the disk devided by "Rest" of Disks

Returns:
aligned size of the disk devided by "Rest" of Disks
double VDRIVE::RSDisk::getCheckCDouble (  ) const [inline]

Get the precomputed nearest double to checkC

Returns:
precomputed nearest double to checkC
mpq_class VDRIVE::RSDisk::getCheckCStar (  ) const [inline]

Get the checkC for the kError copy.

Returns:
checkC for the kError copy.
double VDRIVE::RSDisk::getCheckCStarDouble (  ) const [inline]

Get the precomputed nearest double to checkCStar

Returns:
precomputed nearest double to checkCStar
int64_t VDRIVE::RSDisk::getCPosition (  ) const [inline]

Get the size of the "Rest" of Disks

Returns:
size of the "Rest" of Disks
Disk* VDRIVE::RSDisk::getDisk (  ) const [inline]

Get the underlying Disk

Returns:
underlying Disk
int64_t VDRIVE::RSDisk::getId (  ) [inline]

Get the ID of the underlying Disk

Returns:
ID of the underlying Disk
int32_t VDRIVE::RSDisk::getKError (  ) const [inline]

Get the k, this Disk has a error correcting checkCStar for (-1 for none)

Returns:
k, this Disk has a error correcting checkCStar for (-1 for none)
std::string VDRIVE::RSDisk::getRsId (  ) const [inline]

Get the the id of the RSDisk. (Is it needed?)

Returns:
the id of the RSDisk. (Is it needed?)
static std::string VDRIVE::RSDisk::getXMLRootType (  ) [inline, static]

Get the Root-Type of XML-Elements representing this class.

Returns:
the Root-Type of XML-Elements representing this class.
void VDRIVE::RSDisk::setAlignedCapacity ( int64_t  alignedCapacity ) [inline]

Set the real useable capacity.

Parameters:
alignedCapacityreal useable capacity.
void VDRIVE::RSDisk::setCheckC ( mpq_class  checkC ) [inline]

Set the aligned size of the disk devided by "Rest" of Disks

Parameters:
checkCaligned size of the disk devided by "Rest" of Disks
void VDRIVE::RSDisk::setCheckCStar ( mpq_class  checkCStar ) [inline]

Set the checkC for the kError copy.

Parameters:
checkCStarcheckC for the kError copy.
void VDRIVE::RSDisk::setCPosition ( int64_t  cPosition ) [inline]

Set the size of the "Rest" of Disks

Parameters:
cPositionsize of the "Rest" of Disks
void VDRIVE::RSDisk::setKError ( int32_t  kError ) [inline]

Set the k, this Disk has a error correcting checkCStar for (-1 for none)

Parameters:
kErrork, this Disk has a error correcting checkCStar for (-1 for none)
void VDRIVE::RSDisk::setRsId ( std::string  rsId ) [inline]

Set the the id of the RSDisk. (Is it needed?)

Parameters:
rsIdthe id of the RSDisk. (Is it needed?)
xercesc::DOMElement * RSDisk::toXML ( xercesc::DOMDocument *  doc ) [virtual]

build an XML-Version of this object

Parameters:
docthe document needed to create new XML Elements
Returns:
a new Element containing the description of this object.

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