@ThreadSafe public class StatisticsHandlerKeyedCounter extends Object implements IMutableStatisticsHandlerKeyedCounter
IMutableStatisticsHandlerKeyedCounter| Constructor and Description |
|---|
StatisticsHandlerKeyedCounter() |
| Modifier and Type | Method and Description |
|---|---|
ICommonsSet<String> |
getAllKeys() |
long |
getCount(String sKey)
Get the count of a certain key.
|
int |
getInvocationCount() |
int |
getInvocationCount(String sKey)
Get the invocation count for a single key.
|
void |
increment(String sKey)
Increment by 1
|
void |
increment(String sKey,
long nByHowMany)
Increment by n
|
@Nonnegative public int getInvocationCount()
getInvocationCount in interface IStatisticsHandlerpublic void increment(@Nullable String sKey)
IMutableStatisticsHandlerKeyedCounterincrement in interface IMutableStatisticsHandlerKeyedCountersKey - The key to be incremented.public void increment(@Nullable String sKey, long nByHowMany)
IMutableStatisticsHandlerKeyedCounterincrement in interface IMutableStatisticsHandlerKeyedCountersKey - The key to be incremented.nByHowMany - The amount to increment. May be negative as well@Nonnull @ReturnsMutableCopy public ICommonsSet<String> getAllKeys()
getAllKeys in interface IStatisticsHandlerKeyednull.@CheckForSigned public long getCount(@Nullable String sKey)
IStatisticsHandlerKeyedCountergetCount in interface IStatisticsHandlerKeyedCountersKey - The key to retrieve the count fromCGlobal.ILLEGAL_ULONG if no such key is
present.@CheckForSigned public int getInvocationCount(@Nullable String sKey)
IStatisticsHandlerKeyedgetInvocationCount in interface IStatisticsHandlerKeyedsKey - The key to be queried. May be null.CGlobal.ILLEGAL_UINT if no such key
existsCopyright © 2014–2017 Philip Helger. All rights reserved.