public final class RecordingPos extends Object
Key has the following layout:
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Recording ID | | | +---------------------------------------------------------------+ | Session ID | +---------------------------------------------------------------+ | Source Identity for the Image | | ... ... | +---------------------------------------------------------------+ | Archive ID | | | +---------------------------------------------------------------+
| Modifier and Type | Field and Description |
|---|---|
static String |
NAME
Human-readable name for the counter.
|
static long |
NULL_RECORDING_ID
Represents a null recording id when not found.
|
static int |
RECORDING_POSITION_TYPE_ID
Type id of a recording position counter.
|
| Constructor and Description |
|---|
RecordingPos() |
| Modifier and Type | Method and Description |
|---|---|
static Counter |
allocate(Aeron aeron,
UnsafeBuffer tempBuffer,
long archiveId,
long recordingId,
int sessionId,
int streamId,
String strippedChannel,
String sourceIdentity)
Allocated a recording position counter and populate the metadata.
|
static int |
findCounterIdByRecording(CountersReader countersReader,
long recordingId)
Find the active counter id for a stream based on the recording id.
|
static int |
findCounterIdBySession(CountersReader countersReader,
int sessionId)
Find the active counter id for a stream based on the session id.
|
static long |
getRecordingId(CountersReader countersReader,
int counterId)
Get the recording id for a given counter id.
|
static String |
getSourceIdentity(CountersReader counters,
int counterId)
Get the
Image.sourceIdentity() for the recording. |
static boolean |
isActive(CountersReader counters,
int counterId,
long recordingId)
Is the recording counter still active.
|
public static final int RECORDING_POSITION_TYPE_ID
public static final long NULL_RECORDING_ID
public static final String NAME
public static Counter allocate(Aeron aeron, UnsafeBuffer tempBuffer, long archiveId, long recordingId, int sessionId, int streamId, String strippedChannel, String sourceIdentity)
aeron - on which the counter will be registered.tempBuffer - for encoding the metadata.archiveId - to which the counter belongs.recordingId - for the recording.sessionId - for the publication being recorded.streamId - for the publication being recorded.strippedChannel - for the recording subscription.sourceIdentity - for the publication.public static int findCounterIdByRecording(CountersReader countersReader, long recordingId)
countersReader - to search within.recordingId - for the active recording.CountersReader.NULL_COUNTER_ID.public static int findCounterIdBySession(CountersReader countersReader, int sessionId)
countersReader - to search within.sessionId - for the active recording.CountersReader.NULL_COUNTER_ID.public static long getRecordingId(CountersReader countersReader, int counterId)
countersReader - to search within.counterId - for the active recording.NULL_RECORDING_ID.public static String getSourceIdentity(CountersReader counters, int counterId)
Image.sourceIdentity() for the recording.counters - to search within.counterId - for the active recording.Image.sourceIdentity() for the recording or null if not found.public static boolean isActive(CountersReader counters, int counterId, long recordingId)
counters - to search within.counterId - to search for.recordingId - to confirm it is still the same value.Copyright © 2014-2023 Real Logic Limited. All Rights Reserved.