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

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

java.lang.Object
  extended by org.apache.lens.server.api.metrics.DisabledMethodMetricsContext
All Implemented Interfaces:
MethodMetricsContext

public class DisabledMethodMetricsContext
extends Object
implements MethodMetricsContext

Dummy implementation of MethodMetricsContext. All the methods do nothing. A singleton. Instead of returning null when return type is MethodMetricsContext, return getInstance() instead of null/Optional object.


Nested Class Summary
static class DisabledMethodMetricsContext.InstanceHolder
           
 
Method Summary
static DisabledMethodMetricsContext getInstance()
           
 void markError()
          Error came.
 void markSuccess()
          Method succeeded.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static DisabledMethodMetricsContext getInstance()

markError

public void markError()
Description copied from interface: MethodMetricsContext
Error came. Mark it.

Specified by:
markError in interface MethodMetricsContext

markSuccess

public void markSuccess()
Description copied from interface: MethodMetricsContext
Method succeeded. mark it.

Specified by:
markSuccess in interface MethodMetricsContext


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