#include <DistNearestNeighbour.h>
List of all members.
Detailed Description
Implementation of the Nearest Neighbour strategy (same as Consistent Hashing)
- Author:
- Sascha Effert <fermat@uni-paderborn.de>
Constructor & Destructor Documentation
DistNearestNeighbour::DistNearestNeighbour |
( |
xercesc::DOMElement * |
data ) |
|
Create a new instance from the data in the given XML Element.
- Parameters:
-
DistNearestNeighbour::DistNearestNeighbour |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
generate a new, uninitialized Nearest Neighbor Implementation.
DistNearestNeighbour::DistNearestNeighbour |
( |
bool |
staticNNCopies, |
|
|
int32_t |
nnCopies, |
|
|
int32_t |
nnCopiesFactor |
|
) |
| |
generate a new, uninitialized Nearest Neigbour Implementation which will place nnCopies of each Disk on the ring.
- Parameters:
-
nnCopies | The number of times each disk shall be placed on the ring. |
copy constructor
- Parameters:
-
DistNearestNeighbour::~DistNearestNeighbour |
( |
) |
[virtual] |
Member Function Documentation
virtual int32_t VDRIVE::DistNearestNeighbour::getCopies |
( |
) |
const [inline, virtual] |
std::list< Disk * > * DistNearestNeighbour::getDisks |
( |
) |
const [virtual] |
virtual int64_t VDRIVE::DistNearestNeighbour::getExtentsize |
( |
) |
const [inline, virtual] |
int32_t DistNearestNeighbour::getNNCopies |
( |
std::list< Disk * > * |
disks ) |
const [protected, virtual] |
Get the number of copies of each Disk to be placed. To get a failure of epsilon you need to place
copies of each disk, where n is the number of disks. This method may be overwritten by drived classes to use other values. If the object was created with a static nnCount, this one will be given back.
- Parameters:
-
disks | the disks that shall be placed |
- Returns:
- number of copies of each Disk to be placed.
static std::string VDRIVE::DistNearestNeighbour::getXMLRootType |
( |
) |
[inline, static] |
Get the Root-Type of XML-Elements representing this class.
- Returns:
- the Root-Type of XML-Elements representing this class.
std::list< Disk * > * DistNearestNeighbour::placeExtent |
( |
int64_t |
virtualVolumeId, |
|
|
int64_t |
position |
|
) |
| [virtual] |
void DistNearestNeighbour::setConfiguration |
( |
std::list< Disk * > * |
disks, |
|
|
int64_t |
extentsize, |
|
|
int32_t |
copies |
|
) |
| [virtual] |
void DistNearestNeighbour::setDisks |
( |
std::list< Disk * > * |
disks ) |
[virtual] |
void DistNearestNeighbour::setDisksMulti |
( |
std::list< Disk * > * |
disks, |
|
|
VDRIVE_DNN_MULT * |
multiplicity |
|
) |
| [virtual] |
This function is used by Share to initialize a NearestNeighbour where each Disk may be inserted several times if it surrounds the ring.
virtual xercesc::DOMElement* VDRIVE::DistNearestNeighbour::toXML |
( |
xercesc::DOMDocument * |
doc ) |
const [virtual] |
The documentation for this class was generated from the following files: