public 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 | | ... ... | +---------------------------------------------------------------+
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_ID_OFFSET |
static int |
RECORDING_POSITION_TYPE_ID
Type id of a recording position counter.
|
static int |
SESSION_ID_OFFSET |
static int |
SOURCE_IDENTITY_LENGTH_OFFSET |
static int |
SOURCE_IDENTITY_OFFSET |
Constructor and Description |
---|
RecordingPos() |
Modifier and Type | Method and Description |
---|---|
static Counter |
allocate(Aeron aeron,
UnsafeBuffer tempBuffer,
long recordingId,
int sessionId,
int streamId,
String strippedChannel,
String sourceIdentity) |
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 countersReader,
int counterId)
Get the
Image.sourceIdentity() for the recording. |
static boolean |
isActive(CountersReader countersReader,
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 final int RECORDING_ID_OFFSET
public static final int SESSION_ID_OFFSET
public static final int SOURCE_IDENTITY_LENGTH_OFFSET
public static final int SOURCE_IDENTITY_OFFSET
public static Counter allocate(Aeron aeron, UnsafeBuffer tempBuffer, long recordingId, int sessionId, int streamId, String strippedChannel, String sourceIdentity)
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 countersReader, int counterId)
Image.sourceIdentity()
for the recording.countersReader
- to search within.counterId
- for the active recording.Image.sourceIdentity()
for the recording or null if not found.public static boolean isActive(CountersReader countersReader, int counterId, long recordingId)
countersReader
- to search within.counterId
- to search for.recordingId
- to confirm it is still the same value.Copyright © 2014-2020 Real Logic Limited. All Rights Reserved.