Class HTTPStatistics
java.lang.Object
org.deltava.beans.stats.HTTPStatistics
- All Implemented Interfaces:
Serializable
,Comparable<HTTPStatistics>
A class for storing daily HTTP server statistics.
- Since:
- 1.0
- Version:
- 7.0
- Author:
- Luke
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new Statistics entry for a particular date. -
Method Summary
Modifier and TypeMethodDescriptionint
Compares two statistics objects by comparing their date.long
Returns the total time executing database operations.long
Returns the total number of bytes served.getDate()
Returns the date of these HTTP statistics.long
Returns the total time serving requests.int
Returns the number of Home Page HTTP requests.int
Returns the number of HTTP requests.int
hashCode()
void
setBackEndTime
(long time) Updates the total database time.void
setBandwidth
(long bytes) Updates the total bandwidth used.void
setExecutionTime
(long time) Updates the total serving time.void
setHomePageHits
(int hits) Updates the number of home page HTTP requests.void
setRequests
(int reqs) Updates the number of HTTP requests.
-
Constructor Details
-
HTTPStatistics
Create a new Statistics entry for a particular date.- Parameters:
dt
- the Date- See Also:
-
-
Method Details
-
getDate
Returns the date of these HTTP statistics.- Returns:
- the Date of the statistics
-
getRequests
public int getRequests()Returns the number of HTTP requests.- Returns:
- the number of requests
- See Also:
-
getHomePageHits
public int getHomePageHits()Returns the number of Home Page HTTP requests.- Returns:
- the number of home page requests
- See Also:
-
getExecutionTime
public long getExecutionTime()Returns the total time serving requests.- Returns:
- the time in milliseconds
- See Also:
-
getBackEndTime
public long getBackEndTime()Returns the total time executing database operations.- Returns:
- the time in milliseconds
- See Also:
-
getBandwidth
public long getBandwidth()Returns the total number of bytes served.- Returns:
- the number of bytes served
- See Also:
-
setRequests
public void setRequests(int reqs) Updates the number of HTTP requests.- Parameters:
reqs
- the total number of requests- See Also:
-
setHomePageHits
public void setHomePageHits(int hits) Updates the number of home page HTTP requests.- Parameters:
hits
- the number of home page requests- See Also:
-
setExecutionTime
public void setExecutionTime(long time) Updates the total serving time.- Parameters:
time
- the total time serving requests in milliseconds- See Also:
-
setBackEndTime
public void setBackEndTime(long time) Updates the total database time.- Parameters:
time
- the total database execution time in milliseconds- See Also:
-
setBandwidth
public void setBandwidth(long bytes) Updates the total bandwidth used.- Parameters:
bytes
- the number of bytes served- See Also:
-
hashCode
-
compareTo
Compares two statistics objects by comparing their date.- Specified by:
compareTo
in interfaceComparable<HTTPStatistics>
-