Class ControlSessionCounter

java.lang.Object
io.aeron.archive.ControlSessionCounter

public final class ControlSessionCounter extends Object
A counter that represents client connected to the Archive. It stores control session id as a value and client details in the label.
Since:
1.49.0
  • Field Details

    • TYPE_ID

      public static final int TYPE_ID
      Type id of the counter.
      See Also:
    • ARCHIVE_ID_KEY_OFFSET

      public static final int ARCHIVE_ID_KEY_OFFSET
      Offset withing key buffer where archive id is stored.
      See Also:
    • CONTROL_SESSION_ID_KEY_OFFSET

      public static final int CONTROL_SESSION_ID_KEY_OFFSET
      Offset withing key buffer where control session id is stored.
      See Also:
    • NAME

      public static final String NAME
      Counter name, i.e. the first part of the counter label.
      See Also:
  • Method Details

    • findByControlSessionId

      public static int findByControlSessionId(CountersReader countersReader, long archiveId, long controlSessionId)
      Find the active counter id based on the provided archive and control session ids.
      Parameters:
      countersReader - to search within.
      archiveId - to target specific Archive.
      controlSessionId - for which counter was created.
      Returns:
      the counter id if found, otherwise CountersReader.NULL_COUNTER_ID.