ARC SDK
|
Global list of all active DTRs in the system. More...
#include <arc/data-staging/DTRList.h>
Public Member Functions | |
bool | add_dtr (DTR_ptr DTRToAdd) |
Put a new DTR into the list. More... | |
bool | delete_dtr (DTR_ptr DTRToDelete) |
Remove a DTR from the list. More... | |
bool | filter_dtrs_by_owner (StagingProcesses OwnerToFilter, std::list< DTR_ptr > &FilteredList) |
Filter the queue to select DTRs owned by a specified process. More... | |
int | number_of_dtrs_by_owner (StagingProcesses OwnerToFilter) |
Returns the number of DTRs owned by a particular process. More... | |
bool | filter_dtrs_by_status (DTRStatus::DTRStatusType StatusToFilter, std::list< DTR_ptr > &FilteredList) |
Filter the queue to select DTRs with particular status. More... | |
bool | filter_dtrs_by_statuses (const std::vector< DTRStatus::DTRStatusType > &StatusesToFilter, std::list< DTR_ptr > &FilteredList) |
Filter the queue to select DTRs with particular statuses. More... | |
bool | filter_dtrs_by_statuses (const std::vector< DTRStatus::DTRStatusType > &StatusesToFilter, std::map< DTRStatus::DTRStatusType, std::list< DTR_ptr > > &FilteredList) |
Filter the queue to select DTRs with particular statuses. More... | |
bool | filter_dtrs_by_next_receiver (StagingProcesses NextReceiver, std::list< DTR_ptr > &FilteredList) |
Select DTRs that are about to go to the specified process. More... | |
bool | filter_pending_dtrs (std::list< DTR_ptr > &FilteredList) |
Select DTRs that have just arrived from pre-, post-processor, delivery or generator. More... | |
bool | filter_dtrs_by_job (const std::string &jobid, std::list< DTR_ptr > &FilteredList) |
Get the list of DTRs corresponding to the given job ID. More... | |
void | check_priority_changes (const std::string &filename) |
Check for requested changes in priority in filename. More... | |
void | caching_started (DTR_ptr request) |
Update the caching set, add a DTR (only if it is CACHEABLE). More... | |
void | caching_finished (DTR_ptr request) |
Update the caching set, removing a DTR. More... | |
bool | is_being_cached (DTR_ptr DTRToCheck) |
Returns true if the DTR's source is currently in the caching set. More... | |
bool | empty () |
Returns true if there are no DTRs in the list. More... | |
std::list< std::string > | all_jobs () |
Get the list of all job IDs. More... | |
unsigned int | size () |
Return the size of the DTR list. More... | |
void | dumpState (const std::string &path) |
Dump state of all current DTRs to a destination, eg file, database, url... More... | |
Global list of all active DTRs in the system.
This class contains several methods for filtering the list by owner, state etc.
std::list<std::string> DataStaging::DTRList::all_jobs | ( | ) |
Get the list of all job IDs.
void DataStaging::DTRList::caching_finished | ( | DTR_ptr | request | ) |
Update the caching set, removing a DTR.
void DataStaging::DTRList::caching_started | ( | DTR_ptr | request | ) |
Update the caching set, add a DTR (only if it is CACHEABLE).
void DataStaging::DTRList::check_priority_changes | ( | const std::string & | filename | ) |
Check for requested changes in priority in filename.
filename | File which is checked for priority changes |
void DataStaging::DTRList::dumpState | ( | const std::string & | path | ) |
Dump state of all current DTRs to a destination, eg file, database, url...
Currently only file is supported.
path | Path to the file in which to dump state. |
bool DataStaging::DTRList::empty | ( | ) |
Returns true if there are no DTRs in the list.
bool DataStaging::DTRList::filter_dtrs_by_job | ( | const std::string & | jobid, |
std::list< DTR_ptr > & | FilteredList | ||
) |
Get the list of DTRs corresponding to the given job ID.
jobid | Job id to filter on |
FilteredList | This list is filled with filtered DTRs |
bool DataStaging::DTRList::filter_dtrs_by_next_receiver | ( | StagingProcesses | NextReceiver, |
std::list< DTR_ptr > & | FilteredList | ||
) |
Select DTRs that are about to go to the specified process.
This selection is actually a virtual queue for pre-, post-processor and delivery.
NextReceiver | The process to filter on |
FilteredList | This list is filled with filtered DTRs |
bool DataStaging::DTRList::filter_dtrs_by_owner | ( | StagingProcesses | OwnerToFilter, |
std::list< DTR_ptr > & | FilteredList | ||
) |
Filter the queue to select DTRs owned by a specified process.
OwnerToFilter | The owner to filter on |
FilteredList | This list is filled with filtered DTRs |
bool DataStaging::DTRList::filter_dtrs_by_status | ( | DTRStatus::DTRStatusType | StatusToFilter, |
std::list< DTR_ptr > & | FilteredList | ||
) |
Filter the queue to select DTRs with particular status.
If we have only one common queue for all DTRs, this method is necessary to make virtual queues for the DTRs about to go into the pre-, post-processor or delivery stages.
StatusToFilter | DTR status to filter on |
FilteredList | This list is filled with filtered DTRs |
bool DataStaging::DTRList::filter_dtrs_by_statuses | ( | const std::vector< DTRStatus::DTRStatusType > & | StatusesToFilter, |
std::list< DTR_ptr > & | FilteredList | ||
) |
Filter the queue to select DTRs with particular statuses.
StatusesToFilter | Vector of DTR statuses to filter on |
FilteredList | This list is filled with filtered DTRs |
bool DataStaging::DTRList::filter_dtrs_by_statuses | ( | const std::vector< DTRStatus::DTRStatusType > & | StatusesToFilter, |
std::map< DTRStatus::DTRStatusType, std::list< DTR_ptr > > & | FilteredList | ||
) |
Filter the queue to select DTRs with particular statuses.
StatusesToFilter | Vector of DTR statuses to filter on |
FilteredList | This map is filled with filtered DTRs, one list per state. |
bool DataStaging::DTRList::filter_pending_dtrs | ( | std::list< DTR_ptr > & | FilteredList | ) |
Select DTRs that have just arrived from pre-, post-processor, delivery or generator.
These DTRs need some reaction from the scheduler. This selection is actually a virtual queue of DTRs that need to be processed.
FilteredList | This list is filled with filtered DTRs |
bool DataStaging::DTRList::is_being_cached | ( | DTR_ptr | DTRToCheck | ) |
Returns true if the DTR's source is currently in the caching set.
int DataStaging::DTRList::number_of_dtrs_by_owner | ( | StagingProcesses | OwnerToFilter | ) |
Returns the number of DTRs owned by a particular process.
unsigned int DataStaging::DTRList::size | ( | ) |
Return the size of the DTR list.