wrench::CompoundStorageService

class CompoundStorageService : public wrench::StorageService

An abstract storage service which holds a collection of concrete storage services (eg. SimpleStorageServices). It does not provide direct access to any storage resource. It is meant to be used as a way to postpone the selection of a storage service for a file action (read, write, copy, etc) until a later time in the simulation, rather than during job definition. A typical use for the CompoundStorageService is to select a definitive SimpleStorageService for each action of a job during its scheduling in a BatchScheduler class. This should never receive messages for I/O operations, as any standard storage service (File Read/Write/Delete/Copy/Lookup requests), instead, it overides the main functions of StorageService (readFile / writeFile /…) and will craft messages intended for one or many of its underlying storage services.

Public Functions

CompoundStorageService(const std::string &hostname, std::set<std::shared_ptr<StorageService>> storage_services, StorageSelectionStrategyCallback &allocate, WRENCH_PROPERTY_COLLECTION_TYPE property_list = {}, WRENCH_MESSAGE_PAYLOADCOLLECTION_TYPE messagepayload_list = {})

Constructor.

Parameters:
  • hostname – the name of the host on which this service will run

  • storage_services – subordinate storage services

  • storage_selection – the storage selection strategy callback

  • property_list – the configurable properties

  • messagepayload_list – the configurable message payloads

CompoundStorageService(const std::string &hostname, std::set<std::shared_ptr<StorageService>> storage_services, WRENCH_PROPERTY_COLLECTION_TYPE property_list = {}, WRENCH_MESSAGE_PAYLOADCOLLECTION_TYPE messagepayload_list = {})

Constructor for the case where no request message (for I/O operations) should ever reach the CompoundStorageService. This use case suppose that any action making use of a FileLocation referencing this CompoundStorageService will be intercepted before its execution (in a scheduler for instance) and updated with one of the StorageServices known to this CompoundStorageService.

Parameters:
  • hostname – the name of the host on which this service will run

  • storage_services – subordinate storage services

  • property_list – the configurable properties

  • messagepayload_list – the configurable message payloads