Package org.apache.pekko.cluster.metrics
Class ClusterMetricsExtension
java.lang.Object
org.apache.pekko.cluster.metrics.ClusterMetricsExtension
- All Implemented Interfaces:
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic Tapply(ActorSystem system) static Tapply(ClassicActorSystemProvider system) static ClusterMetricsExtensioncreateExtension(ExtendedActorSystem system) static final booleanstatic ClusterMetricsExtensionget(ActorSystem system) static ClusterMetricsExtensionget(ClassicActorSystemProvider system) static final inthashCode()static ClusterMetricsExtension$lookup()settings()Metrics extension configuration.voidSubscribe user metrics listener actor untoClusterMetricsEventevents published by extension on the system event bus.Supervisor actor.voidunsubscribe(ActorRef metricsListenter) Unsubscribe user metrics listener actor fromClusterMetricsEventevents published by extension on the system event bus.
-
Constructor Details
-
ClusterMetricsExtension
-
-
Method Details
-
lookup
-
get
-
get
-
createExtension
-
apply
-
apply
-
hashCode
public static final int hashCode() -
equals
-
settings
Metrics extension configuration. -
supervisor
Supervisor actor. Accepts subtypes ofCollectionControlMessages to manage metrics collection at runtime. -
subscribe
Subscribe user metrics listener actor untoClusterMetricsEventevents published by extension on the system event bus. -
unsubscribe
Unsubscribe user metrics listener actor fromClusterMetricsEventevents published by extension on the system event bus.
-