Package org.apache.cxf.metrics.codahale
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 Summary
Fields Modifier and Type Field Description protected StringbaseNameprotected com.codahale.metrics.TimercheckedApplicationFaultsprotected com.codahale.metrics.MeterincomingDataprotected com.codahale.metrics.CounterinFlightprotected com.codahale.metrics.TimerlogicalRuntimeFaultsprotected com.codahale.metrics.MeteroutgoingDataprotected com.codahale.metrics.MetricRegistryregistryprotected com.codahale.metrics.TimerruntimeFaultsprotected com.codahale.metrics.Timertotalsprotected com.codahale.metrics.TimeruncheckedApplicationFaults
-
Constructor Summary
Constructors Constructor Description CodahaleMetricsContext(String prefix, com.codahale.metrics.MetricRegistry registry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()StringgetBaseName()com.codahale.metrics.TimergetCheckedApplicationFaults()com.codahale.metrics.MetergetIncomingData()com.codahale.metrics.CountergetInFlight()com.codahale.metrics.TimergetLogicalRuntimeFaults()com.codahale.metrics.MetergetOutgoingData()com.codahale.metrics.MetricRegistrygetRegistry()com.codahale.metrics.TimergetRuntimeFaults()com.codahale.metrics.TimergetTotals()com.codahale.metrics.TimergetUncheckedApplicationFaults()voidstart(Exchange ex)Will be called at the start of invoke (or when added to a started MessageMetrics).voidstop(long timeInNS, long inSize, long outSize, Exchange ex)Called when the invocation is complete.
-
-
-
Field Detail
-
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 Detail
-
CodahaleMetricsContext
public CodahaleMetricsContext(String prefix, com.codahale.metrics.MetricRegistry registry)
-
-
Method Detail
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
start
public void start(Exchange ex)
Description copied from interface:MetricsContextWill 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:
startin interfaceMetricsContext
-
stop
public void stop(long timeInNS, long inSize, long outSize, Exchange ex)Description copied from interface:MetricsContextCalled when the invocation is complete.- Specified by:
stopin interfaceMetricsContext
-
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()
-
-