WRENCH  1.11
Cyberinfrastructure Simulation Workbench
Overview Installation Getting Started WRENCH 101 WRENCH 102
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
wrench::SimulationTimestampFileRead Class Reference

A base class for simulation timestamps regarding file reads. More...

#include <SimulationTimestampTypes.h>

Inheritance diagram for wrench::SimulationTimestampFileRead:
wrench::SimulationTimestampPair wrench::SimulationTimestampType wrench::SimulationTimestampFileReadCompletion wrench::SimulationTimestampFileReadFailure wrench::SimulationTimestampFileReadStart

Public Member Functions

SimulationTimestampFileReadgetEndpoint () override
 Retrieve the matching endpoint, if any. More...
 
std::shared_ptr< DataFilegetFile ()
 retrieves the DataFile being read More...
 
std::shared_ptr< StorageServicegetService ()
 retrieves the storage service for file read More...
 
std::shared_ptr< FileLocationgetSource ()
 retrieves the location from which the DataFile is being copied More...
 
std::shared_ptr< WorkflowTaskgetTask ()
 retrieves task associated w/ file read More...
 
- Public Member Functions inherited from wrench::SimulationTimestampPair
 SimulationTimestampPair ()
 Constructor.
 
 SimulationTimestampPair (double date, SimulationTimestampPair *endpoint)
 Constructor. More...
 
- Public Member Functions inherited from wrench::SimulationTimestampType
 SimulationTimestampType ()
 
More...
 
double getDate ()
 Retrieve the date recorded for this timestamp. More...
 

Protected Member Functions

 SimulationTimestampFileRead (double date, std::shared_ptr< DataFile >file, std::shared_ptr< FileLocation > src, std::shared_ptr< StorageService > service, std::shared_ptr< WorkflowTask >task=nullptr)
 Constructor. More...
 
void setEndpoints ()
 Sets the endpoint of the calling object (SimulationTimestampFileReadFailure, SimulationTimestampFileReadTerminated, SimulationTimestampFileReadStart) with a SimulationTimestampFileReadStart object.
 

Protected Attributes

std::shared_ptr< DataFilefile
 The DataFile that was being read.
 
std::shared_ptr< StorageServiceservice
 Service that initiated the read.
 
std::shared_ptr< FileLocationsource
 The location where the DataFile was being read from.
 
std::shared_ptr< WorkflowTasktask
 Task tied to read.
 
- Protected Attributes inherited from wrench::SimulationTimestampPair
SimulationTimestampPairendpoint = nullptr
 An optional associated "endpoint" simulation timestamp.
 
- Protected Attributes inherited from wrench::SimulationTimestampType
double date = -0.1
 Date.
 

Static Protected Attributes

static std::unordered_multimap< FileReadWrite, std::pair< SimulationTimestampFileRead *, std::shared_ptr< WorkflowTask > > > pending_file_reads
 the data structure that holds the ongoing file reads. More...
 

Detailed Description

A base class for simulation timestamps regarding file reads.

Constructor & Destructor Documentation

◆ SimulationTimestampFileRead()

wrench::SimulationTimestampFileRead::SimulationTimestampFileRead ( double  date,
std::shared_ptr< DataFile file,
std::shared_ptr< FileLocation src_location,
std::shared_ptr< StorageService service,
std::shared_ptr< WorkflowTask task = nullptr 
)
protected

Constructor.

Parameters
datethe date
filethe DataFile associated with this file read
src_locationthe source location
serviceservice requesting file read
taska task associated to this file read (or nullptr)

Member Function Documentation

◆ getEndpoint()

SimulationTimestampFileRead * wrench::SimulationTimestampFileRead::getEndpoint ( )
overridevirtual

Retrieve the matching endpoint, if any.

retrieves the corresponding SimulationTimestampFileRead object

Returns
a pointer to the start or end SimulationTimestampFileRead object

Reimplemented from wrench::SimulationTimestampPair.

◆ getFile()

std::shared_ptr< DataFile > wrench::SimulationTimestampFileRead::getFile ( )

retrieves the DataFile being read

Returns
a pointer to the DataFile associated with this reads

◆ getService()

std::shared_ptr< StorageService > wrench::SimulationTimestampFileRead::getService ( )

retrieves the storage service for file read

Returns
point to the service associated with this read

◆ getSource()

std::shared_ptr< FileLocation > wrench::SimulationTimestampFileRead::getSource ( )

retrieves the location from which the DataFile is being copied

Returns
the read's source location

◆ getTask()

std::shared_ptr< WorkflowTask > wrench::SimulationTimestampFileRead::getTask ( )

retrieves task associated w/ file read

Returns
a pointer to the WorkflowTask associated with this timestamp

Member Data Documentation

◆ pending_file_reads

std::unordered_multimap< FileReadWrite, std::pair< SimulationTimestampFileRead *, std::shared_ptr< WorkflowTask > > > wrench::SimulationTimestampFileRead::pending_file_reads
staticprotected

the data structure that holds the ongoing file reads.

A static unordered multimap of SimulationTimestampFileReadStart objects that have yet to be matched with Failure, Terminated or Completion timestamps.

static std::unordered_multimap<File, std::pair<SimulationTimestampFileRead *, double>, decltype(&file_hash)> pending_file_reads;


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