EclypseRequest#

class eclypse.remote.communication.request.EclypseRequest[source]#

Bases: object

Class for an Eclypse request.

Methods

__init__(recipient_ids, data, _comm[, timestamp])

Create a new EclypseRequest.

Attributes

data

Get the data of the request.

elapsed_times

The elapsed times until the responses were received.

recipient_ids

The ids of the recipients.

responses

Wait for the responses to the MPI request.

routes

Wait for the routes to be computed.

timestamp

Get the timestamp of the request.

__init__(recipient_ids, data, _comm, timestamp=None)[source]#

Create a new EclypseRequest.

Parameters:
  • recipient_ids (list[str]) – The ids of the recipients.

  • data (dict[str, Any]) – The data of the request.

  • _comm (EclypseCommunicationInterface) – The communication interface.

  • timestamp (datetime | None, optional) – The timestamp of the request. Defaults to None.

property data: dict[str, Any]#

Get the data of the request.

Returns:

The data.

Return type:

dict[str, Any]

property timestamp: datetime#

Get the timestamp of the request.

Returns:

The timestamp.

Return type:

datetime

property recipient_ids: list[str]#

The ids of the recipients.

Returns:

The ids.

Return type:

list[str]

property routes: list[Route | None]#

Wait for the routes to be computed.

This method can be awaited explicitly to compute the routes to the recipients. Otherwise, it is awaited implicitly when the EclypseRequest object is awaited to process the request.

property responses: list[Any | None]#

Wait for the responses to the MPI request.

This method can be called explicitly to wait for the responses to the EclypseRequest. Otherwise, it is called implicitly when the EclypseRequest object is awaited to process the request.

property elapsed_times: list[timedelta | None]#

The elapsed times until the responses were received.

Returns:

The elapsed times until the responses were received.

If a response is not yet available, a timedelta of 0 is returned for the corresponding recipient.

Return type:

list[timedelta]