Get and put method invocation examples

These are examples of the sequence of calls that occur for Get or Put within a map.

It demonstrates sharing connections, both active (the connection is already being used in the current map) and inactive (the connection is not being used by any current map).

Sequence of calls

  1. The map calls ValidateProperties.
  2. The map determines if an active connection exists.

For inactive connections

  1. The map calls CompareConnections.
  2. The map determines if there is a match.
  3. If there is a match, the map calls:
    • BeginTransaction
    • OnNotify(Start)
  4. If there is no match, the map calls:
    • Connect
    • BeginTransaction
    • OnNotify(Start)
  5. The map then calls Get or Put for every message available to process.

For active connections

  1. The map calls CompareConnections.
  2. The map determines if there is a match.
  3. If there is a match, the map calls:
    • OnNotify(Start)
  4. If there is no match, the map calls:
    • Connect
    • BeginTransaction
    • OnNotify(Start)
  5. The map then calls Get or Put for every message available to process.

No more messages to process

  1. If there are no more messages to process, the map calls:
    • OnNotify(Stop)
    • EndTransaction
    • Disconnect

The Disconnect call is not made immediately after the EndTransaction, but only after the process has terminated or the connection expiration timeout occurs. The description shows the scenario in which the Scope setting is set to Map. Even if there are multiple bursts, there is only one call to BeginTransaction and one to EndTransaction. If the Scope setting was instead set to Burst, BeginTransaction would be called at the start of each burst, and EndTransaction at the end of the burst. This scenario for adapters is for allowing only one transaction for each connection. For an adapter to allow multiple transactions on a connection, the BeginTransaction call is made even if the CompareConnection call returns MPI_CMP_EQUAL.