Package org.apache.storm.messaging

## Interface IConnection

- All Superinterfaces:
    `AutoCloseable`
  All Known Implementing Classes:
    `Client`, `ConnectionWithStatus`

      public interface IConnection
      extends AutoCloseable

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `close()` | close this connection.
    `Map<Integer,​Load>` | `getLoad​(Collection<Integer> tasks)` | Get the current load for the given tasks.
    `int` | `getPort()` | Get the port for this connection.
    `void` | `send​(Iterator<TaskMessage> msgs)` | send batch messages.
    `void` | `sendBackPressureStatus​(BackPressureStatus bpStatus)` | Sends the back pressure metrics to all downstream connections.
    `void` | `sendLoadMetrics​(Map<Integer,​Double> taskToLoad)` | Send load metrics to all downstream connections.

- - ### Method Detail

    - #### sendLoadMetrics

          void sendLoadMetrics​(Map<Integer,​Double> taskToLoad)

      Send load metrics to all downstream connections.
      Parameters:
        `taskToLoad` - a map from the task id to the load for that task.

    - #### sendBackPressureStatus

          void sendBackPressureStatus​(BackPressureStatus bpStatus)

      Sends the back pressure metrics to all downstream connections.

    - #### send

          void send​(Iterator<TaskMessage> msgs)

      send batch messages.

    - #### getLoad

          Map<Integer,​Load> getLoad​(Collection<Integer> tasks)

      Get the current load for the given tasks.
      Parameters:
        `tasks` - the tasks to look for.
      Returns:
        a Load for each of the tasks it knows about.

    - #### getPort

          int getPort()

      Get the port for this connection.
      Returns:
        The port this connection is using

    - #### close

          void close()

      close this connection.
      Specified by:
        `close` in interface `AutoCloseable`