co.cask.tigon.metrics
Class NoOpMetricsCollectionService

java.lang.Object
  extended by com.google.common.util.concurrent.AbstractIdleService
      extended by co.cask.tigon.metrics.NoOpMetricsCollectionService
All Implemented Interfaces:
MetricsCollectionService, com.google.common.util.concurrent.Service

public class NoOpMetricsCollectionService
extends com.google.common.util.concurrent.AbstractIdleService
implements MetricsCollectionService

No-op, to be used in unit-tests


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.google.common.util.concurrent.Service
com.google.common.util.concurrent.Service.Listener, com.google.common.util.concurrent.Service.State
 
Constructor Summary
NoOpMetricsCollectionService()
           
 
Method Summary
 MetricsCollector getCollector(MetricsScope scope, String context, String runId)
          Returns the metric collector for the given context.
protected  void shutDown()
           
protected  void startUp()
           
 
Methods inherited from class com.google.common.util.concurrent.AbstractIdleService
addListener, executor, isRunning, start, startAndWait, state, stop, stopAndWait, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.common.util.concurrent.Service
addListener, isRunning, start, startAndWait, state, stop, stopAndWait
 

Constructor Detail

NoOpMetricsCollectionService

public NoOpMetricsCollectionService()
Method Detail

startUp

protected void startUp()
                throws Exception
Specified by:
startUp in class com.google.common.util.concurrent.AbstractIdleService
Throws:
Exception

shutDown

protected void shutDown()
                 throws Exception
Specified by:
shutDown in class com.google.common.util.concurrent.AbstractIdleService
Throws:
Exception

getCollector

public MetricsCollector getCollector(MetricsScope scope,
                                     String context,
                                     String runId)
Description copied from interface: MetricsCollectionService
Returns the metric collector for the given context.

Specified by:
getCollector in interface MetricsCollectionService
context - Name of the context that generating the metric.
runId - The Id fo the given run that generating the metric.
Returns:
A MetricsCollector for emitting metrics.


Copyright © 2014 Cask Data, Inc. Licensed under the Apache License, Version 2.0.