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
EWMAfor 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 Tapply(ActorSystem system)static Tapply(ClassicActorSystemProvider system)static ClusterMetricsExtensioncreateExtension(ExtendedActorSystem system)static booleanequals(java.lang.Object other)static ClusterMetricsExtensionget(ActorSystem system)static ClusterMetricsExtensionget(ClassicActorSystemProvider system)static inthashCode()static ClusterMetricsExtension$lookup()ClusterMetricsSettingssettings()Metrics extension configuration.voidsubscribe(ActorRef metricsListener)Subscribe user metrics listener actor untoClusterMetricsEventevents published by extension on the system event bus.ActorRefsupervisor()Supervisor actor.voidunsubscribe(ActorRef metricsListenter)Unsubscribe user metrics listener actor fromClusterMetricsEventevents 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 ofCollectionControlMessages to manage metrics collection at runtime.
-
subscribe
public void subscribe(ActorRef metricsListener)
Subscribe user metrics listener actor untoClusterMetricsEventevents published by extension on the system event bus.
-
unsubscribe
public void unsubscribe(ActorRef metricsListenter)
Unsubscribe user metrics listener actor fromClusterMetricsEventevents published by extension on the system event bus.
-
-