Class SessionRequestCounts
java.lang.Object
io.goobi.viewer.model.statistics.usage.SessionRequestCounts
Class holding counts of requests of different
RequestTypes. Should be serialized to a string to dao storage- Author:
- florian
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty default constructorSessionRequestCounts(String data) Constructor to deserialize data from a string -
Method Summary
Modifier and TypeMethodDescriptionbooleanTwo SessionRequestCounts are equal if the have the same request counts for allRequestTypes.getCount(RequestType type) Get the total count of requests for a givenRequestTypeinthashCode()voidincrementCount(RequestType type) Increment the total count of requests for a givenRequestTypeby onevoidsetCount(RequestType type, long count) Set the total count of requests for a givenRequestTypeTurn into a json representation
-
Constructor Details
-
SessionRequestCounts
public SessionRequestCounts()Empty default constructor -
SessionRequestCounts
Constructor to deserialize data from a string- Parameters:
data-
-
-
Method Details
-
setCount
Set the total count of requests for a givenRequestType- Parameters:
type-count-
-
incrementCount
Increment the total count of requests for a givenRequestTypeby one- Parameters:
type-
-
getCount
Get the total count of requests for a givenRequestType- Parameters:
type-- Returns:
Long
-
toJsonArray
Turn into a json representation- Returns:
- a json String
-
hashCode
public int hashCode() -
equals
Two SessionRequestCounts are equal if the have the same request counts for allRequestTypes.
-