Class SessionRequestCounts
java.lang.Object
io.goobi.viewer.model.statistics.usage.SessionRequestCounts
Class holding counts of requests of different
RequestType
s. Should be serialized to a string to dao storage- Author:
- florian
-
Constructor Summary
ConstructorDescriptionEmpty default constructorSessionRequestCounts
(String data) Constructor to deserialize data from a string -
Method Summary
Modifier and TypeMethodDescriptionboolean
Two SessionRequestCounts are equal if the have the same request counts for allRequestType
s.getCount
(RequestType type) Get the total count of requests for a givenRequestType
int
hashCode()
void
incrementCount
(RequestType type) Increment the total count of requests for a givenRequestType
by onevoid
setCount
(RequestType type, long count) Set the total count of requests for a givenRequestType
Turn 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 givenRequestType
by 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 allRequestType
s.
-