Package akka.cluster.metrics
Class ClusterMetricsExtension
- java.lang.Object
-
- akka.cluster.metrics.ClusterMetricsExtension
-
- All Implemented Interfaces:
Extension
public class ClusterMetricsExtension extends java.lang.Object implements Extension
Cluster metrics extension.Cluster metrics is primarily for load-balancing of nodes. It controls metrics sampling at a regular frequency, prepares highly variable data for further analysis by other entities, and publishes the latest cluster metrics data around the node ring and local eventStream to assist in determining the need to redirect traffic to the least-loaded nodes.
Metrics sampling is delegated to the
MetricsCollector
.Smoothing of the data for each monitored process is delegated to the
EWMA
for exponential weighted moving average.
-
-
Constructor Summary
Constructors Constructor Description ClusterMetricsExtension(ExtendedActorSystem system)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static T
apply(ActorSystem system)
static T
apply(ClassicActorSystemProvider system)
static ClusterMetricsExtension
createExtension(ExtendedActorSystem system)
static boolean
equals(java.lang.Object other)
static ClusterMetricsExtension
get(ActorSystem system)
static ClusterMetricsExtension
get(ClassicActorSystemProvider system)
static int
hashCode()
static ClusterMetricsExtension$
lookup()
ClusterMetricsSettings
settings()
Metrics extension configuration.void
subscribe(ActorRef metricsListener)
Subscribe user metrics listener actor untoClusterMetricsEvent
events published by extension on the system event bus.ActorRef
supervisor()
Supervisor actor.void
unsubscribe(ActorRef metricsListenter)
Unsubscribe user metrics listener actor fromClusterMetricsEvent
events published by extension on the system event bus.
-
-
-
Constructor Detail
-
ClusterMetricsExtension
public ClusterMetricsExtension(ExtendedActorSystem system)
-
-
Method Detail
-
lookup
public static ClusterMetricsExtension$ lookup()
-
get
public static ClusterMetricsExtension get(ActorSystem system)
-
get
public static ClusterMetricsExtension get(ClassicActorSystemProvider system)
-
createExtension
public static ClusterMetricsExtension createExtension(ExtendedActorSystem system)
-
apply
public static T apply(ActorSystem system)
-
apply
public static T apply(ClassicActorSystemProvider system)
-
hashCode
public static final int hashCode()
-
equals
public static final boolean equals(java.lang.Object other)
-
settings
public ClusterMetricsSettings settings()
Metrics extension configuration.
-
supervisor
public ActorRef supervisor()
Supervisor actor. Accepts subtypes ofCollectionControlMessage
s to manage metrics collection at runtime.
-
subscribe
public void subscribe(ActorRef metricsListener)
Subscribe user metrics listener actor untoClusterMetricsEvent
events published by extension on the system event bus.
-
unsubscribe
public void unsubscribe(ActorRef metricsListenter)
Unsubscribe user metrics listener actor fromClusterMetricsEvent
events published by extension on the system event bus.
-
-