Package marauroa.server.game
Class Statistics
java.lang.Object
marauroa.server.game.Statistics
- All Implemented Interfaces:
StatisticsMBean
This class encapsulate everything related to the statistics recollection and
storage.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis class is very similar to a Mapwith the extra that adds some comodity methods like: add print -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic inttime between statistics dumps -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds an attribute to its existinglongReturn the value of an attribute since the server start.static StatisticsReturns an unique instance of Statistics.voidprint()Print to $statistics_filename file the content of the statistics object.voidSets an attribute
-
Field Details
-
DATABASE_STATISTICS_LAPSUS
public static final int DATABASE_STATISTICS_LAPSUStime between statistics dumps- See Also:
- Constant Field Values
-
-
Method Details
-
getStatistics
Returns an unique instance of Statistics. This is a singleton.- Returns:
- a statistics object
-
set
Sets an attribute- Parameters:
type- attribute namevalue- its value
-
add
Adds an attribute to its existing- Parameters:
type-value-
-
get
Return the value of an attribute since the server start. This method is used by the Bean interface.- Specified by:
getin interfaceStatisticsMBean- Parameters:
type- the attribute name- Returns:
- value
-
print
public void print()Print to $statistics_filename file the content of the statistics object.
-