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::SimulationTimestampFileWrite Class Reference

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

#include <SimulationTimestampTypes.h>

Inheritance diagram for wrench::SimulationTimestampFileWrite:
wrench::SimulationTimestampPair wrench::SimulationTimestampType wrench::SimulationTimestampFileWriteCompletion wrench::SimulationTimestampFileWriteFailure wrench::SimulationTimestampFileWriteStart

Public Member Functions

std::shared_ptr< FileLocation > getDestination ()
 retrieves the location from which the DataFile is being copied More...
 
SimulationTimestampFileWritegetEndpoint () override
 Retrieve the matching endpoint, if any. More...
 
std::shared_ptr< DataFilegetFile ()
 retrieves the DataFile being written More...
 
std::shared_ptr< StorageServicegetService ()
 retrieves the Service that ordered file write More...
 
std::shared_ptr< WorkflowTaskgetTask ()
 retrieves task associated w/ file write More...
 
- Public Member Functions inherited from wrench::SimulationTimestampType
 SimulationTimestampType ()
 
More...
 
double getDate ()
 Retrieve the date recorded for this timestamp. More...
 

Protected Member Functions

 SimulationTimestampFileWrite (double date, std::shared_ptr< DataFile >file, std::shared_ptr< FileLocation > dst, std::shared_ptr< StorageService > service, std::shared_ptr< WorkflowTask >task=nullptr)
 Constructor. More...
 
void setEndpoints ()
 Sets the endpoint of the calling object (SimulationTimestampFileWriteFailure, SimulationTimestampFileWriteTerminated, SimulationTimestampFileWriteStart) with a SimulationTimestampFileWriteStart object.
 

Protected Attributes

std::shared_ptr< FileLocation > destination
 The location where the DataFile was being write from.
 
std::shared_ptr< DataFilefile
 The DataFile that was being write.
 
std::shared_ptr< StorageServiceservice
 Service that initiated the write.
 
std::shared_ptr< WorkflowTasktask
 Task associated with write.
 
- 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< SimulationTimestampFileWrite *, std::shared_ptr< WorkflowTask > > > pending_file_writes
 the data structure that holds the ongoing file writes. More...
 

Detailed Description

A base class for simulation timestamps regarding file writes.

Constructor & Destructor Documentation

◆ SimulationTimestampFileWrite()

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

Constructor.

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

Member Function Documentation

◆ getDestination()

std::shared_ptr< FileLocation > wrench::SimulationTimestampFileWrite::getDestination ( )

retrieves the location from which the DataFile is being copied

Returns
the write's destination location

◆ getEndpoint()

SimulationTimestampFileWrite * wrench::SimulationTimestampFileWrite::getEndpoint ( )
overridevirtual

Retrieve the matching endpoint, if any.

retrieves the corresponding SimulationTimestampFileWrite object

Returns
a pointer to the start or end SimulationTimestampFileWrite object

Reimplemented from wrench::SimulationTimestampPair.

◆ getFile()

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

retrieves the DataFile being written

Returns
a pointer to the DataFile associated with this writes

◆ getService()

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

retrieves the Service that ordered file write

Returns
point to the service associated with this write

◆ getTask()

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

retrieves task associated w/ file write

Returns
a pointer to the WorkflowTask associated with this timestamp

Member Data Documentation

◆ pending_file_writes

std::unordered_multimap< FileReadWrite, std::pair< SimulationTimestampFileWrite *, std::shared_ptr< WorkflowTask > > > wrench::SimulationTimestampFileWrite::pending_file_writes
staticprotected

the data structure that holds the ongoing file writes.

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

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


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