Class CodahaleMetricsContext

java.lang.Object
org.apache.cxf.metrics.codahale.CodahaleMetricsContext
All Implemented Interfaces:
Closeable, AutoCloseable, MetricsContext

public class CodahaleMetricsContext extends Object implements MetricsContext, Closeable
  • Field Details

    • inFlight

      protected com.codahale.metrics.Counter inFlight
    • totals

      protected com.codahale.metrics.Timer totals
    • uncheckedApplicationFaults

      protected com.codahale.metrics.Timer uncheckedApplicationFaults
    • checkedApplicationFaults

      protected com.codahale.metrics.Timer checkedApplicationFaults
    • runtimeFaults

      protected com.codahale.metrics.Timer runtimeFaults
    • logicalRuntimeFaults

      protected com.codahale.metrics.Timer logicalRuntimeFaults
    • incomingData

      protected com.codahale.metrics.Meter incomingData
    • outgoingData

      protected com.codahale.metrics.Meter outgoingData
    • baseName

      protected final String baseName
    • registry

      protected final com.codahale.metrics.MetricRegistry registry
  • Constructor Details

    • CodahaleMetricsContext

      public CodahaleMetricsContext(String prefix, com.codahale.metrics.MetricRegistry registry)
  • Method Details

    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • start

      public void start(org.apache.cxf.message.Exchange ex)
      Description copied from interface: MetricsContext
      Will be called at the start of invoke (or when added to a started MessageMetrics). This is when the metrics should increment "inFlight" counts and other stats. There is no need to record a "start time" as the invoke time will be passed into the stop method.
      Specified by:
      start in interface MetricsContext
    • stop

      public void stop(long timeInNS, long inSize, long outSize, org.apache.cxf.message.Exchange ex)
      Description copied from interface: MetricsContext
      Called when the invocation is complete.
      Specified by:
      stop in interface MetricsContext
    • getInFlight

      public com.codahale.metrics.Counter getInFlight()
    • getTotals

      public com.codahale.metrics.Timer getTotals()
    • getUncheckedApplicationFaults

      public com.codahale.metrics.Timer getUncheckedApplicationFaults()
    • getCheckedApplicationFaults

      public com.codahale.metrics.Timer getCheckedApplicationFaults()
    • getRuntimeFaults

      public com.codahale.metrics.Timer getRuntimeFaults()
    • getLogicalRuntimeFaults

      public com.codahale.metrics.Timer getLogicalRuntimeFaults()
    • getIncomingData

      public com.codahale.metrics.Meter getIncomingData()
    • getOutgoingData

      public com.codahale.metrics.Meter getOutgoingData()
    • getBaseName

      public String getBaseName()
    • getRegistry

      public com.codahale.metrics.MetricRegistry getRegistry()