DataStaging::TransferShares Class Reference

TransferShares is used to implement fair-sharing and priorities. More...

#include <TransferShares.h>

Public Member Functions

 TransferShares ()
 TransferShares (const TransferSharesConf &shares_conf)
 ~TransferShares ()
 TransferShares (const TransferShares &shares)
TransferSharesoperator= (const TransferShares &shares)
void set_shares_conf (const TransferSharesConf &share_conf)
void calculate_shares (int TotalNumberOfSlots)
void increase_transfer_share (const std::string &ShareToIncrease)
void decrease_transfer_share (const std::string &ShareToDecrease)
void decrease_number_of_slots (const std::string &ShareToDecrease)
bool can_start (const std::string &ShareToStart)
std::map< std::string, int > active_shares () const

Detailed Description

TransferShares is used to implement fair-sharing and priorities.

TransferShares defines the algorithm used to prioritise and share transfers among different users or groups. Configuration information on the share type and reference shares is held in a TransferSharesConf instance. The Scheduler uses TransferShares to determine which DTRs in the queue for each process go first. The calculation is based on the configuration and the currently active shares (the DTRs already in the process). can_start() is the method called by the Scheduler to determine whether a particular share has an available slot in the process.


Member Function Documentation

void DataStaging::TransferShares::calculate_shares ( int  TotalNumberOfSlots  ) 

Calculate how many slots to assign to each active share.

This method is called each time the Scheduler loops to calculate the number of slots to assign to each share, based on the current number of active shares and the shares' relative priorities.

void DataStaging::TransferShares::decrease_number_of_slots ( const std::string &  ShareToDecrease  ) 

Decrease by one the number of slots available to the given share.

Called when there is a slot already used by this share to reduce the number available.

void DataStaging::TransferShares::decrease_transfer_share ( const std::string &  ShareToDecrease  ) 

Decrease by one the active count for the given share.

Called when a completed DTR leaves the queue.

void DataStaging::TransferShares::increase_transfer_share ( const std::string &  ShareToIncrease  ) 

Increase by one the active count for the given share.

Called when a new DTR enters the queue.


The documentation for this class was generated from the following file:
Generated on Wed Jun 27 11:54:36 2012 for Hosting Environment (Daemon) by  doxygen 1.6.3