Class CommandStatsEntry
java.lang.Object
org.deltava.beans.stats.CommandStatsEntry
- All Implemented Interfaces:
Serializable, Comparable<CommandStatsEntry>
public class CommandStatsEntry
extends Object
implements Serializable, Comparable<CommandStatsEntry>
A bean to store Web Site Command statistics.
- Since:
- 1.0
- Version:
- 7.0
- Author:
- Luke
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCommandStatsEntry(String name) Creates a new Web Site Command statistics bean. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(CommandStatsEntry cse2) Compares two statistics beans by comparing their command names.intReturns the average back-end data source use time.intReturns the average Command execution time.intgetCount()Returns the number of times the Command was executed.intReturns the miaxmum back-end data source use time.intReturns the maximum Command execution time.getName()Returns the Command ID.intReturns the number of times the Command was successfully executed.voidsetAvgBackEndTime(int time) Updates the average back-end data source usage for this Command.voidsetAvgTime(int time) Updates the average execution time of this Command.voidsetCount(int count) Updates the execution count for this Command.voidsetMaxBackEndTime(int time) Updates the maximum back-end data source usage time for this Command.voidsetMaxTime(int time) Updates the maximum execution time for this Command.voidsetSuccessCount(int count) Updates the number of times this Command was successfully executed.
-
Constructor Details
-
CommandStatsEntry
Creates a new Web Site Command statistics bean.- Parameters:
name- the command ID- Throws:
NullPointerException- if name is null- See Also:
-
-
Method Details
-
getName
-
getCount
public int getCount()Returns the number of times the Command was executed.- Returns:
- the invocation count
- See Also:
-
getSuccessCount
public int getSuccessCount()Returns the number of times the Command was successfully executed.- Returns:
- the invocation count
- See Also:
-
getAvgTime
public int getAvgTime()Returns the average Command execution time.- Returns:
- the average execution time, in milliseconds
- See Also:
-
getAvgBackEndTime
public int getAvgBackEndTime()Returns the average back-end data source use time.- Returns:
- the average use time, in milliseconds
- See Also:
-
getMaxTime
public int getMaxTime()Returns the maximum Command execution time.- Returns:
- the maximum execution time, in millseconds
- See Also:
-
getMaxBackEndTime
public int getMaxBackEndTime()Returns the miaxmum back-end data source use time.- Returns:
- the maximum use time, in millseconds
- See Also:
-
setCount
public void setCount(int count) Updates the execution count for this Command.- Parameters:
count- the number of times this Command was invoked- Throws:
IllegalArgumentException- if count is negative- See Also:
-
setSuccessCount
public void setSuccessCount(int count) Updates the number of times this Command was successfully executed.- Parameters:
count- the successful invocation count- Throws:
IllegalArgumentException- if count is negative- See Also:
-
setAvgTime
public void setAvgTime(int time) Updates the average execution time of this Command.- Parameters:
time- the execution time in milliseconds- Throws:
IllegalArgumentException- if time is negative- See Also:
-
setAvgBackEndTime
public void setAvgBackEndTime(int time) Updates the average back-end data source usage for this Command.- Parameters:
time- the average usage in milliseconds- Throws:
IllegalArgumentException- if time is negative- See Also:
-
setMaxTime
public void setMaxTime(int time) Updates the maximum execution time for this Command.- Parameters:
time- the maximum execution time in millseconds- Throws:
IllegalArgumentException- if time is negative- See Also:
-
setMaxBackEndTime
public void setMaxBackEndTime(int time) Updates the maximum back-end data source usage time for this Command.- Parameters:
time- the maximum usage time in millseconds- Throws:
IllegalArgumentException- if time is negative- See Also:
-
compareTo
Compares two statistics beans by comparing their command names.- Specified by:
compareToin interfaceComparable<CommandStatsEntry>
-