This project has retired. For details please refer to its Attic page.
MethodMetrics (Lens 2.1.0-beta-incubating API)

org.apache.lens.server.api.metrics
Class MethodMetrics

java.lang.Object
  extended by org.apache.lens.server.api.metrics.MethodMetrics

public class MethodMetrics
extends Object

metrics measuring for resource methods. Every resource method has one timer and two meters associated with it. One meter is marking number of invocations of the method, another is marking number of invocations where exception occurred.


Nested Class Summary
 class MethodMetrics.Context
          Inner class instances handle contexts for the same instance of MethodMetrics.
 
Constructor Summary
MethodMetrics(com.codahale.metrics.Meter meter, com.codahale.metrics.Timer successTimer, com.codahale.metrics.Timer exceptionTimer)
           
 
Method Summary
 long getCount()
           
 long getErrorCount()
           
 long getSuccessCount()
           
 MethodMetricsContext newContext()
          Create and return new context since an execution of this method has started
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodMetrics

public MethodMetrics(@NonNull
                     com.codahale.metrics.Meter meter,
                     @NonNull
                     com.codahale.metrics.Timer successTimer,
                     @NonNull
                     com.codahale.metrics.Timer exceptionTimer)
Method Detail

newContext

public MethodMetricsContext newContext()
Create and return new context since an execution of this method has started


getCount

public long getCount()

getSuccessCount

public long getSuccessCount()

getErrorCount

public long getErrorCount()


Copyright © 2014–2015 Apache Software Foundation. All rights reserved.