Class MeteringBehavior
- java.lang.Object
-
- scala.runtime.AbstractPartialFunction<Object,scala.runtime.BoxedUnit>
-
- org.opendaylight.controller.cluster.common.actor.MeteringBehavior
-
- All Implemented Interfaces:
scala.Function1<Object,scala.runtime.BoxedUnit>
,scala.PartialFunction<Object,scala.runtime.BoxedUnit>
public class MeteringBehavior extends scala.runtime.AbstractPartialFunction<Object,scala.runtime.BoxedUnit>
Represents behaviour that can be exhibited by actors of typeUntypedActor
This behaviour meters actor's default behaviour. It captures 2 metrics:
- message processing rate of actor's receive block
- message processing rate by message type
MetricsReporter
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface scala.PartialFunction
scala.PartialFunction.AndThen<A extends Object,B extends Object,C extends Object>, scala.PartialFunction.Lifted<A extends Object,B extends Object>, scala.PartialFunction.OrElse<A extends Object,B extends Object>, scala.PartialFunction.Unlifted<A extends Object,B extends Object>
-
-
Constructor Summary
Constructors Constructor Description MeteringBehavior(AbstractActor actor)
MeteringBehavior(AbstractUntypedActorWithMetering actor)
Constructs an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description scala.runtime.BoxedUnit
apply(Object message)
Uses 2 timers to measure message processing rate.boolean
isDefinedAt(Object obj)
-
Methods inherited from class scala.runtime.AbstractPartialFunction
andThen, apply$mcDD$sp, apply$mcDF$sp, apply$mcDI$sp, apply$mcDJ$sp, apply$mcFD$sp, apply$mcFF$sp, apply$mcFI$sp, apply$mcFJ$sp, apply$mcID$sp, apply$mcIF$sp, apply$mcII$sp, apply$mcIJ$sp, apply$mcJD$sp, apply$mcJF$sp, apply$mcJI$sp, apply$mcJJ$sp, apply$mcVD$sp, apply$mcVF$sp, apply$mcVI$sp, apply$mcVJ$sp, apply$mcZD$sp, apply$mcZF$sp, apply$mcZI$sp, apply$mcZJ$sp, applyOrElse, compose, lift, orElse, runWith, toString
-
-
-
-
Field Detail
-
DOMAIN
public static final String DOMAIN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MeteringBehavior
public MeteringBehavior(AbstractUntypedActorWithMetering actor)
Constructs an instance.- Parameters:
actor
- whose behaviour needs to be metered
-
MeteringBehavior
public MeteringBehavior(AbstractActor actor)
-
-
Method Detail
-
isDefinedAt
public boolean isDefinedAt(Object obj)
-
apply
public scala.runtime.BoxedUnit apply(Object message)
Uses 2 timers to measure message processing rate. One for overall message processing rate and another to measure rate by message type. The timers are re-used if they were previously created.MetricRegistry
maintains a reservoir for different timers where collected timings are kept. It exposes various metrics for each timer based on collected data. Eg: count of messages, 99, 95, 50... percentiles, max, mean etc.These metrics are exposed as JMX bean.
- Specified by:
apply
in interfacescala.Function1<Object,scala.runtime.BoxedUnit>
- Overrides:
apply
in classscala.runtime.AbstractPartialFunction<Object,scala.runtime.BoxedUnit>
- Parameters:
message
- the message to process- See Also:
- http://dropwizard.github.io/metrics/manual/core/#timers
-
-