Package org.apache.jackrabbit.oak.stats
Class NoopStats
- java.lang.Object
-
- org.apache.jackrabbit.oak.stats.NoopStats
-
- All Implemented Interfaces:
CounterStats
,Counting
,HistogramStats
,MeterStats
,Stats
,TimerStats
public final class NoopStats extends Object implements TimerStats, MeterStats, CounterStats, HistogramStats
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.jackrabbit.oak.stats.TimerStats
TimerStats.Context
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dec()
Decrement the counter by one.void
dec(long n)
Decrement the counter byn
.long
getCount()
Returns the current count.void
inc()
Increment the counter by one.void
inc(long n)
Increment the counter byn
.void
mark()
Mark the occurrence of an event.void
mark(long n)
Mark the occurrence of a given number of events.TimerStats.Context
time()
Returns a newTimerStats.Context
.void
update(long value)
Adds a recorded value.void
update(long duration, TimeUnit unit)
Adds a recorded duration.
-
-
-
Field Detail
-
INSTANCE
public static final NoopStats INSTANCE
-
-
Method Detail
-
getCount
public long getCount()
Description copied from interface:Counting
Returns the current count.
-
inc
public void inc()
Description copied from interface:CounterStats
Increment the counter by one.- Specified by:
inc
in interfaceCounterStats
-
dec
public void dec()
Description copied from interface:CounterStats
Decrement the counter by one.- Specified by:
dec
in interfaceCounterStats
-
inc
public void inc(long n)
Description copied from interface:CounterStats
Increment the counter byn
.- Specified by:
inc
in interfaceCounterStats
- Parameters:
n
- the amount by which the counter will be increased
-
dec
public void dec(long n)
Description copied from interface:CounterStats
Decrement the counter byn
.- Specified by:
dec
in interfaceCounterStats
- Parameters:
n
- the amount by which the counter will be decreased
-
mark
public void mark()
Description copied from interface:MeterStats
Mark the occurrence of an event.- Specified by:
mark
in interfaceMeterStats
-
mark
public void mark(long n)
Description copied from interface:MeterStats
Mark the occurrence of a given number of events.- Specified by:
mark
in interfaceMeterStats
- Parameters:
n
- the number of events
-
update
public void update(long duration, TimeUnit unit)
Description copied from interface:TimerStats
Adds a recorded duration.- Specified by:
update
in interfaceTimerStats
- Parameters:
duration
- the length of the durationunit
- the scale unit ofduration
-
time
public TimerStats.Context time()
Description copied from interface:TimerStats
Returns a newTimerStats.Context
.- Specified by:
time
in interfaceTimerStats
- Returns:
- a new
TimerStats.Context
- See Also:
TimerStats.Context
-
update
public void update(long value)
Description copied from interface:HistogramStats
Adds a recorded value.- Specified by:
update
in interfaceHistogramStats
- Parameters:
value
- the length of the value
-
-