WRENCH
1.11
Cyberinfrastructure Simulation Workbench
|
Overview | Installation | Getting Started | WRENCH 101 | WRENCH 102 |
An abstraction of an execution controller, i.e., a running process that interacts with other services to accomplish some computational goal. More...
#include <ExecutionController.h>
Public Member Functions | |
std::shared_ptr< BandwidthMeterService > | createBandwidthMeter (const std::map< std::string, double > &measurement_periods) |
Instantiate and start a bandwidth meter. More... | |
std::shared_ptr< BandwidthMeterService > | createBandwidthMeter (const std::vector< std::string > &linknames, double measurement_period) |
Instantiate and start a bandwidth meter. More... | |
virtual std::shared_ptr< DataMovementManager > | createDataMovementManager () |
Instantiate and start a data movement manager. More... | |
std::shared_ptr< EnergyMeterService > | createEnergyMeter (const std::map< std::string, double > &measurement_periods) |
Instantiate and start an energy meter. More... | |
std::shared_ptr< EnergyMeterService > | createEnergyMeter (const std::vector< std::string > &hostnames, double measurement_period) |
Instantiate and start an energy meter. More... | |
virtual std::shared_ptr< JobManager > | createJobManager () |
Instantiate and start a job manager. More... | |
virtual void | processEventCompoundJobCompletion (std::shared_ptr< CompoundJobCompletedEvent >) |
Process a standard job completion event. More... | |
virtual void | processEventCompoundJobFailure (std::shared_ptr< CompoundJobFailedEvent >) |
Process a standard job failure event. More... | |
virtual void | processEventFileCopyCompletion (std::shared_ptr< FileCopyCompletedEvent >) |
Process a file copy completion event. More... | |
virtual void | processEventFileCopyFailure (std::shared_ptr< FileCopyFailedEvent >) |
Process a file copy failure event. More... | |
virtual void | processEventPilotJobExpiration (std::shared_ptr< PilotJobExpiredEvent >) |
Process a pilot job expiration event. More... | |
virtual void | processEventPilotJobStart (std::shared_ptr< PilotJobStartedEvent >) |
Process a pilot job start event. More... | |
virtual void | processEventStandardJobCompletion (std::shared_ptr< StandardJobCompletedEvent >) |
Process a standard job completion event. More... | |
virtual void | processEventStandardJobFailure (std::shared_ptr< StandardJobFailedEvent >) |
Process a standard job failure event. More... | |
virtual void | processEventTimer (std::shared_ptr< TimerEvent >) |
Process a timer event. More... | |
void | waitForAndProcessNextEvent () |
Wait for an execution event and then call the associated function to process that event. | |
bool | waitForAndProcessNextEvent (double timeout) |
Wait for an execution event and then call the associated function to process that event. More... | |
std::shared_ptr< ExecutionEvent > | waitForNextEvent () |
Wait for an execution event. More... | |
std::shared_ptr< ExecutionEvent > | waitForNextEvent (double timeout) |
Wait for an execution event. More... | |
Public Member Functions inherited from wrench::Service | |
void | assertServiceIsUp () |
Throws an exception if the service is not up. More... | |
std::string | getHostname () |
Get the name of the host on which the service is / will be running. More... | |
double | getNetworkTimeoutValue () |
Returns the service's network timeout value. More... | |
std::string | getPhysicalHostname () |
Get the physical name of the host on which the service is / will be running. More... | |
bool | getPropertyValueAsBoolean (WRENCH_PROPERTY_TYPE) |
Get a property of the Service as a boolean. More... | |
double | getPropertyValueAsDouble (WRENCH_PROPERTY_TYPE) |
Get a property of the Service as a double. More... | |
std::string | getPropertyValueAsString (WRENCH_PROPERTY_TYPE) |
Get a property of the Service as a string. More... | |
unsigned long | getPropertyValueAsUnsignedLong (WRENCH_PROPERTY_TYPE) |
Get a property of the Service as an unsigned long. More... | |
bool | isUp () |
Returns true if the service is UP, false otherwise. More... | |
void | resume () |
Resume the service. More... | |
void | setNetworkTimeoutValue (double value) |
Sets the service's network timeout value. More... | |
void | start (std::shared_ptr< Service > this_service, bool daemonize, bool auto_restart) |
Start the service. More... | |
virtual void | stop () |
Synchronously stop the service (does nothing if the service is already stopped) More... | |
void | suspend () |
Suspend the service. | |
Protected Member Functions | |
ExecutionController (const std::string &hostname, const std::string suffix) | |
Constructor. More... | |
void | setTimer (double date, std::string message) |
Sets a timer (which, when it goes off, will generate a TimerEvent) More... | |
An abstraction of an execution controller, i.e., a running process that interacts with other services to accomplish some computational goal.
|
protected |
Constructor.
hostname | the name of the host on which to run the controller |
suffix | a string to append to the controller process name (which will show up in logs) |
std::invalid_argument |
std::shared_ptr< BandwidthMeterService > wrench::ExecutionController::createBandwidthMeter | ( | const std::map< std::string, double > & | measurement_periods | ) |
Instantiate and start a bandwidth meter.
measurement_periods | the measurement period for each metered link |
std::shared_ptr< BandwidthMeterService > wrench::ExecutionController::createBandwidthMeter | ( | const std::vector< std::string > & | linknames, |
double | measurement_period | ||
) |
Instantiate and start a bandwidth meter.
linknames | the list of metered links |
measurement_period | the measurement period |
|
virtual |
Instantiate and start a data movement manager.
std::shared_ptr< EnergyMeterService > wrench::ExecutionController::createEnergyMeter | ( | const std::map< std::string, double > & | measurement_periods | ) |
Instantiate and start an energy meter.
measurement_periods | the measurement period for each metered host |
std::shared_ptr< EnergyMeterService > wrench::ExecutionController::createEnergyMeter | ( | const std::vector< std::string > & | hostnames, |
double | measurement_period | ||
) |
Instantiate and start an energy meter.
hostnames | the list of metered hosts, as hostnames |
measurement_period | the measurement period |
|
virtual |
Instantiate and start a job manager.
|
virtual |
Process a standard job completion event.
event | a CompoundJobCompletedEvent |
|
virtual |
Process a standard job failure event.
event | a CompoundJobFailedEvent |
|
virtual |
Process a file copy completion event.
event | a FileCopyCompletedEvent |
|
virtual |
Process a file copy failure event.
event | a FileCopyFailedEvent |
|
virtual |
Process a pilot job expiration event.
event | a PilotJobExpiredEvent |
|
virtual |
Process a pilot job start event.
event | a PilotJobStartedEvent |
|
virtual |
Process a standard job completion event.
event | a StandardJobCompletedEvent |
|
virtual |
Process a standard job failure event.
event | a StandardJobFailedEvent |
|
virtual |
Process a timer event.
event | a TimerEvent |
|
protected |
Sets a timer (which, when it goes off, will generate a TimerEvent)
date | the date at which the timer should go off |
message | a string message that will be in the generated TimerEvent |
bool wrench::ExecutionController::waitForAndProcessNextEvent | ( | double | timeout | ) |
Wait for an execution event and then call the associated function to process that event.
timeout | a timeout value in seconds |
wrench::ExecutionException |
std::shared_ptr< ExecutionEvent > wrench::ExecutionController::waitForNextEvent | ( | ) |
Wait for an execution event.
std::shared_ptr< ExecutionEvent > wrench::ExecutionController::waitForNextEvent | ( | double | timeout | ) |
Wait for an execution event.
timeout | a timeout value in seconds |