Package com.berryworks.jquantify
Class SessionCounterInterval
- java.lang.Object
-
- com.berryworks.jquantify.EventCounterInterval
-
- com.berryworks.jquantify.SessionCounterInterval
-
- All Implemented Interfaces:
Interval,Serializable
public class SessionCounterInterval extends EventCounterInterval
This class implementsIntervalfor use bySessionCounter.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.berryworks.jquantify.EventCounterInterval
events
-
-
Constructor Summary
Constructors Constructor Description SessionCounterInterval()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int inCount)Registers the occurrence of n new events.SessionCounterIntervalcopy(SessionCounterInterval inFrom)Copies the state of theIntervalargument into thisSessionCounterInterval.longgetConcurrency()Gets the number of concurrent events underway at the present time.longgetPeakConcurrency()Gets the maximum concurrency level observed during this interval.voidremove(int inCount)Remove a number of sessionsStringtoString()Summarizes thisIntervalas a String for display purposes.-
Methods inherited from class com.berryworks.jquantify.EventCounterInterval
copy, getCumulativeEvents, getDuration, getEventRatePerSecond, getEvents, getStartTime, intervalsBefore, isPast, setClosed
-
-
-
-
Method Detail
-
getPeakConcurrency
public long getPeakConcurrency()
Gets the maximum concurrency level observed during this interval.- Returns:
- The peakConcurrency value
-
copy
public SessionCounterInterval copy(SessionCounterInterval inFrom)
Copies the state of theIntervalargument into thisSessionCounterInterval.- Parameters:
inFrom- - SessionCounterInterval to be copied- Returns:
- the SessionCounterInterval into which values were copied
-
getConcurrency
public long getConcurrency()
Gets the number of concurrent events underway at the present time.- Returns:
- The concurrency value
-
add
public void add(int inCount)
Description copied from interface:IntervalRegisters the occurrence of n new events.Intended for internal use only.
- Specified by:
addin interfaceInterval- Overrides:
addin classEventCounterInterval- Parameters:
inCount- number of events to be counted
-
remove
public void remove(int inCount)
Remove a number of sessions- Parameters:
inCount- - number of sessions to be removed
-
toString
public String toString()
Description copied from class:EventCounterIntervalSummarizes thisIntervalas a String for display purposes.- Overrides:
toStringin classEventCounterInterval- Returns:
- String summary
-
-