wrench::StorageServiceFileWriteAnswerMessage

class StorageServiceFileWriteAnswerMessage : public wrench::StorageServiceMessage

A message sent by a StorageService in answer to a file write request.

Public Functions

StorageServiceFileWriteAnswerMessage(std::shared_ptr<FileLocation> &location, bool success, std::shared_ptr<FailureCause> failure_cause, std::map<S4U_CommPort*, double> data_write_commport_and_bytes, double buffer_size, double payload)

Constructor.

Parameters:
  • location – the file’s location

  • success – whether the write operation succeeded

  • failure_cause – the cause of the failure (nullptr if success)

  • data_write_commports_and_bytes – commports to which bytes need to be sent

  • buffer_size – the buffer size to use

  • payload – the message size in bytes

Throws:

std::invalid_argument

Public Members

double buffer_size

The buffer size to use.

std::map<S4U_CommPort*, double> data_write_commport_and_bytes

The set of destination commports and the number of bytes to send to each.

std::shared_ptr<FailureCause> failure_cause

The cause of the failure, if any, or nullptr.

std::shared_ptr<FileLocation> location

The file location hould be written.

bool success

Whether the write operation request was accepted or not.