Package org.apache.jackrabbit.oak.stats
Class SimpleStats
java.lang.Object
org.apache.jackrabbit.oak.stats.SimpleStats
- All Implemented Interfaces:
CounterStats,Counting,HistogramStats,MeterStats,Stats,TimerStats
public final class SimpleStats
extends Object
implements TimerStats, MeterStats, CounterStats, HistogramStats
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.apache.jackrabbit.oak.stats.TimerStats
TimerStats.Context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddec()Decrement the counter by one.voiddec(long n) Decrement the counter byn.longgetCount()Returns the current count.voidinc()Increment the counter by one.voidinc(long n) Increment the counter byn.voidmark()Mark the occurrence of an event.voidmark(long n) Mark the occurrence of a given number of events.time()Returns a newTimerStats.Context.voidupdate(long value) Adds a recorded value.voidAdds a recorded duration.
-
Constructor Details
-
SimpleStats
-
-
Method Details
-
getCount
public long getCount()Description copied from interface:CountingReturns the current count. -
inc
public void inc()Description copied from interface:CounterStatsIncrement the counter by one.- Specified by:
incin interfaceCounterStats
-
dec
public void dec()Description copied from interface:CounterStatsDecrement the counter by one.- Specified by:
decin interfaceCounterStats
-
inc
public void inc(long n) Description copied from interface:CounterStatsIncrement the counter byn.- Specified by:
incin interfaceCounterStats- Parameters:
n- the amount by which the counter will be increased
-
dec
public void dec(long n) Description copied from interface:CounterStatsDecrement the counter byn.- Specified by:
decin interfaceCounterStats- Parameters:
n- the amount by which the counter will be decreased
-
mark
public void mark()Description copied from interface:MeterStatsMark the occurrence of an event.- Specified by:
markin interfaceMeterStats
-
mark
public void mark(long n) Description copied from interface:MeterStatsMark the occurrence of a given number of events.- Specified by:
markin interfaceMeterStats- Parameters:
n- the number of events
-
update
Description copied from interface:TimerStatsAdds a recorded duration.- Specified by:
updatein interfaceTimerStats- Parameters:
duration- the length of the durationunit- the scale unit ofduration
-
time
Description copied from interface:TimerStatsReturns a newTimerStats.Context.- Specified by:
timein interfaceTimerStats- Returns:
- a new
TimerStats.Context - See Also:
-
update
public void update(long value) Description copied from interface:HistogramStatsAdds a recorded value.- Specified by:
updatein interfaceHistogramStats- Parameters:
value- the length of the value
-