public final class ClusterCounters extends Object
ClusteredServiceContainer.Context.clusterId().| Modifier and Type | Method and Description |
|---|---|
static Counter |
allocate(Aeron aeron,
MutableDirectBuffer tempBuffer,
String name,
int typeId,
int clusterId)
Allocate a counter to represent component state within a cluster.
|
static Counter |
allocateServiceCounter(Aeron aeron,
MutableDirectBuffer tempBuffer,
String name,
int typeId,
int clusterId,
int serviceId)
Allocate a counter to represent component state within a cluster.
|
static Counter |
allocateVersioned(Aeron aeron,
MutableDirectBuffer tempBuffer,
String name,
int typeId,
int clusterId,
String version,
String commitHashCode)
Allocate a counter to represent component state within a cluster and append a version info to its label.
|
static int |
find(CountersReader counters,
int typeId,
int clusterId)
Find the counter id for a type of counter in a cluster.
|
public static Counter allocate(Aeron aeron, MutableDirectBuffer tempBuffer, String name, int typeId, int clusterId)
aeron - to allocate the counter.tempBuffer - temporary storage to create label and metadata.name - of the counter for the label.typeId - for the counter.clusterId - to which the allocated counter belongs.Counter.public static Counter allocateVersioned(Aeron aeron, MutableDirectBuffer tempBuffer, String name, int typeId, int clusterId, String version, String commitHashCode)
aeron - to allocate the counter.tempBuffer - temporary storage to create label and metadata.name - of the counter for the label.typeId - for the counter.clusterId - to which the allocated counter belongs.version - of the component.commitHashCode - Git commit SHA of the component.Counter.public static int find(CountersReader counters, int typeId, int clusterId)
counters - to search within.typeId - of the counter.clusterId - to which the allocated counter belongs.Aeron.NULL_VALUE if not found.public static Counter allocateServiceCounter(Aeron aeron, MutableDirectBuffer tempBuffer, String name, int typeId, int clusterId, int serviceId)
aeron - to allocate the counter.tempBuffer - temporary storage to create label and metadata.name - of the counter for the label.typeId - for the counter.clusterId - to which the allocated counter belongs.serviceId - to which the allocated counter belongs.Counter for the commit position.Copyright © 2014-2023 Real Logic Limited. All Rights Reserved.