public class MetricsService extends Object implements ManagedService, LiveOperationsTracker
MetricsPublishers.| Modifier and Type | Field and Description |
|---|---|
static String |
SERVICE_NAME |
| Constructor and Description |
|---|
MetricsService(NodeEngine nodeEngine) |
MetricsService(NodeEngine nodeEngine,
Supplier<MetricsRegistry> metricsRegistrySupplier) |
| Modifier and Type | Method and Description |
|---|---|
LiveOperationRegistry |
getLiveOperationRegistry() |
void |
init(NodeEngine nodeEngine,
Properties properties)
Initializes this service.
|
void |
populate(LiveOperations liveOperations)
Populate the LiveOperations
|
CompletableFuture<ConcurrentArrayRingbuffer.RingbufferSlice<Map.Entry<Long,byte[]>>> |
readMetrics(long startSequence)
Read metrics from the journal from the given sequence.
|
void |
registerPublisher(Function<NodeEngine,MetricsPublisher> registerFunction)
Register a custom
MetricsPublisher implementation with a register
function that takes NodeEngine as input letting the caller to
optionally initialize the publisher returned from the function. |
void |
reset()
Resets this service back to its initial state.
|
void |
shutdown(boolean terminate)
Shuts down this service.
|
public static final String SERVICE_NAME
public MetricsService(NodeEngine nodeEngine)
public MetricsService(NodeEngine nodeEngine, Supplier<MetricsRegistry> metricsRegistrySupplier)
public void init(NodeEngine nodeEngine, Properties properties)
ManagedServiceinit in interface ManagedServicenodeEngine - the NodeEngine that this service belongs toproperties - the Properties (can be used to pass settings to the service)public void registerPublisher(Function<NodeEngine,MetricsPublisher> registerFunction)
MetricsPublisher implementation with a register
function that takes NodeEngine as input letting the caller to
optionally initialize the publisher returned from the function.registerFunction - The function that returns with the MetricsPublisher
instance.public LiveOperationRegistry getLiveOperationRegistry()
public void populate(LiveOperations liveOperations)
LiveOperationsTrackerpopulate in interface LiveOperationsTrackerliveOperations - the LiveOperations to populate.public CompletableFuture<ConcurrentArrayRingbuffer.RingbufferSlice<Map.Entry<Long,byte[]>>> readMetrics(long startSequence)
startSequence - The sequence start reading the metrics with.public void reset()
ManagedServiceTODO: what is the purpose of reset
reset in interface ManagedServicepublic void shutdown(boolean terminate)
ManagedServiceTODO: what is the purpose of the terminate variable
shutdown in interface ManagedServiceterminate - true to shut down this serviceCopyright © 2019 Hazelcast, Inc.. All rights reserved.