ARC SDK
Public Member Functions
DataStaging::TransferShares Class Reference

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

#include <arc/data-staging/TransferShares.h>

Public Member Functions

 TransferShares ()
 Create a new TransferShares with default configuration.
 
 TransferShares (const TransferSharesConf &shares_conf)
 Create a new TransferShares with given configuration.
 
 ~TransferShares ()
 Empty destructor.
 
void set_shares_conf (const TransferSharesConf &share_conf)
 Set a new configuration, if a new reference share gets added for example.
 
void calculate_shares (int TotalNumberOfSlots)
 Calculate how many slots to assign to each active share. More...
 
void 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.
 
void 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 decrease_number_of_slots (const std::string &ShareToDecrease)
 Decrease by one the number of slots available to the given share. More...
 
bool can_start (const std::string &ShareToStart)
 Returns true if there is a slot available for the given share.
 
std::map< std::string, int > active_shares () const
 Returns the map of active shares.
 

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.


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