Package io.aeron.archive
Class ControlSessionCounter
java.lang.Object
io.aeron.archive.ControlSessionCounter
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final intOffset withingkeybuffer where archive id is stored.static final intOffset withingkeybuffer where control session id is stored.static final StringCounter name, i.e.static final intType id of the counter. -
Method Summary
Modifier and TypeMethodDescriptionstatic intfindByControlSessionId(CountersReader countersReader, long archiveId, long controlSessionId) Find the active counter id based on the provided archive and control session ids.
-
Field Details
-
TYPE_ID
public static final int TYPE_IDType id of the counter.- See Also:
-
ARCHIVE_ID_KEY_OFFSET
public static final int ARCHIVE_ID_KEY_OFFSETOffset withingkeybuffer where archive id is stored.- See Also:
-
CONTROL_SESSION_ID_KEY_OFFSET
public static final int CONTROL_SESSION_ID_KEY_OFFSETOffset withingkeybuffer where control session id is stored.- See Also:
-
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.
-