public class HeartbeatTimestamp extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
HEARTBEAT_TYPE_ID
Type id of a heartbeat counter.
|
static int |
REGISTRATION_ID_OFFSET
Offset in the key metadata for the registration id of the counter.
|
| Constructor and Description |
|---|
HeartbeatTimestamp() |
| Modifier and Type | Method and Description |
|---|---|
static AtomicCounter |
allocate(MutableDirectBuffer tempBuffer,
String name,
int typeId,
CountersManager countersManager,
long registrationId)
Allocate a counter for tracking the last heartbeat of an entity.
|
static int |
allocateCounterId(MutableDirectBuffer tempBuffer,
String name,
int typeId,
CountersManager countersManager,
long registrationId)
Allocate a counter id for tracking the last heartbeat of an entity.
|
static int |
findCounterIdByRegistrationId(CountersReader countersReader,
int counterTypeId,
long registrationId)
Find the active counter id for a heartbeat timestamp.
|
static boolean |
isActive(CountersReader countersReader,
int counterId,
int counterTypeId,
long registrationId)
Is the counter active for usage? Checks to see if reclaimed or reused and matches registration id.
|
public static final int HEARTBEAT_TYPE_ID
public static final int REGISTRATION_ID_OFFSET
public static AtomicCounter allocate(MutableDirectBuffer tempBuffer, String name, int typeId, CountersManager countersManager, long registrationId)
tempBuffer - to be used for labels and key.name - of the counter for the label.typeId - of the counter for classification.countersManager - from which the underlying storage is allocated.registrationId - to be associated with the counter.AtomicCounter for tracking the last heartbeat.public static int allocateCounterId(MutableDirectBuffer tempBuffer, String name, int typeId, CountersManager countersManager, long registrationId)
tempBuffer - to be used for labels and key.name - of the counter for the label.typeId - of the counter for classification.countersManager - from which the underlying storage is allocated.registrationId - to be associated with the counter.public static int findCounterIdByRegistrationId(CountersReader countersReader, int counterTypeId, long registrationId)
countersReader - to search within.counterTypeId - to match on.registrationId - for the active client.CountersReader.NULL_COUNTER_ID.public static boolean isActive(CountersReader countersReader, int counterId, int counterTypeId, long registrationId)
countersReader - to search within.counterId - to test.counterTypeId - to validate type.registrationId - for the entity.Copyright © 2014-2023 Real Logic Limited. All Rights Reserved.