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.