com.planet_ink.coffee_mud.Common.interfaces
Interface CoffeeTableRow

All Superinterfaces:
java.lang.Cloneable, CMCommon, CMObject, java.lang.Comparable<CMObject>
All Known Implementing Classes:
DefaultCoffeeTableRow

public interface CoffeeTableRow
extends CMCommon

A CoffeeTableRow object represents a period of sustained statistics gathering. The CoffeeMud engine keeps counters on all manner of different game events, such as logins, new players, levels, deaths, and others. CoffeeTableRows are managed by the CoffeeTables library.

See Also:
StatisticsLibrary

Field Summary
static int STAT_BIRTHS
          a constant index into statistics for a birth event
static int STAT_CLASSCHANGE
          a constant index into statistics for a class change event
static int STAT_DEATHS
          a constant index into statistics for a death event
static int STAT_DIVORCES
          a constant index into statistics for a divorce event
static int STAT_LEVELSGAINED
          a constant index into statistics for a level gain event
static int STAT_LOGINS
          a constant index into statistics for login events
static int STAT_MARRIAGES
          a constant index into statistics for a marriage event
static int STAT_NEWPLAYERS
          a constant index into statistics for a new player event
static int STAT_PKDEATHS
          a constant index into statistics for pk death event
static int STAT_PURGES
          a constant index into statistics for a purge event
static int STAT_QUESTACCEPTED
          a constant index into statistics for a quest accepted
static int STAT_QUESTDROPPED
          a constant index into statistics for a quest dropped
static int STAT_QUESTFAILED
          a constant index into statistics for a quest failed
static int STAT_QUESTFAILEDSTART
          a constant index into statistics for a quest failed start
static int STAT_QUESTSTARTATTEMPT
          a constant index into statistics for a manual start
static int STAT_QUESTSTOP
          a constant index into statistics for a quest manual stop
static int STAT_QUESTSUCCESS
          a constant index into statistics for a quest success
static int STAT_QUESTTIMESTART
          a constant index into statistics for a times start
static int STAT_QUESTTIMESTOP
          a constant index into statistics for a quest timeout stop
static int STAT_SKILLUSE
          a constant index into statistics for a skill use event
static int STAT_SPECIAL_NUMONLINE
          a constant index into statistics for a num players online poll event
static int STAT_TICKSONLINE
          a constant index into statistics for a tick event
static int STAT_TOTAL
          a constant index of the total number of enumerated statistical events
 
Method Summary
 void bumpVal(CMObject E, int type)
          Gathers relevant information about the given Environmental object (usually MOB or Ability) and adds to the relevant statistics.
 void bumpVal(java.lang.String s, int type)
          Finds a named statistic of the given name, and increments the value of that long statistic by 1.
 java.lang.String data()
          Returns an XML document representing all the information in this object.
 long endTime()
          The end time, in millis since 1970, for this row of data
 long highestOnline()
          Returns the highest number of players online during this period.
 long numberOnlineCounter()
          Returns the number of times the number of players online has been polled during this period.
 long numberOnlineTotal()
          Returns the cumulative number online during this period per poll.
 void populate(long start, long end, java.lang.String data)
          Populates this object from an xml document containing relevant statistics.
 void setEndTime(long time)
          Sets the end time, in millis since 1970, for this row of data
 void setStartTime(long time)
          Sets the start time, in millis since 1970, for this row of data
 long startTime()
          The start time, in millis since 1970, for this row of data
 java.lang.String tagFix(java.lang.String s)
          Simple method that replaces a strings spaces with _ characters, and makes the string uppercase.
 void totalUp(java.lang.String code, long[] tot)
          Loops through adding all the event stats for the given code string together
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject
copyOf, ID, initializeClass, name, newInstance
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

STAT_LOGINS

static final int STAT_LOGINS
a constant index into statistics for login events

See Also:
Constant Field Values

STAT_TICKSONLINE

static final int STAT_TICKSONLINE
a constant index into statistics for a tick event

See Also:
Constant Field Values

STAT_NEWPLAYERS

static final int STAT_NEWPLAYERS
a constant index into statistics for a new player event

See Also:
Constant Field Values

STAT_LEVELSGAINED

static final int STAT_LEVELSGAINED
a constant index into statistics for a level gain event

See Also:
Constant Field Values

STAT_DEATHS

static final int STAT_DEATHS
a constant index into statistics for a death event

See Also:
Constant Field Values

STAT_PKDEATHS

static final int STAT_PKDEATHS
a constant index into statistics for pk death event

See Also:
Constant Field Values

STAT_MARRIAGES

static final int STAT_MARRIAGES
a constant index into statistics for a marriage event

See Also:
Constant Field Values

STAT_BIRTHS

static final int STAT_BIRTHS
a constant index into statistics for a birth event

See Also:
Constant Field Values

STAT_DIVORCES

static final int STAT_DIVORCES
a constant index into statistics for a divorce event

See Also:
Constant Field Values

STAT_CLASSCHANGE

static final int STAT_CLASSCHANGE
a constant index into statistics for a class change event

See Also:
Constant Field Values

STAT_PURGES

static final int STAT_PURGES
a constant index into statistics for a purge event

See Also:
Constant Field Values

STAT_SKILLUSE

static final int STAT_SKILLUSE
a constant index into statistics for a skill use event

See Also:
Constant Field Values

STAT_TOTAL

static final int STAT_TOTAL
a constant index of the total number of enumerated statistical events

See Also:
Constant Field Values

STAT_QUESTFAILEDSTART

static final int STAT_QUESTFAILEDSTART
a constant index into statistics for a quest failed start

See Also:
Constant Field Values

STAT_QUESTTIMESTART

static final int STAT_QUESTTIMESTART
a constant index into statistics for a times start

See Also:
Constant Field Values

STAT_QUESTTIMESTOP

static final int STAT_QUESTTIMESTOP
a constant index into statistics for a quest timeout stop

See Also:
Constant Field Values

STAT_QUESTSTOP

static final int STAT_QUESTSTOP
a constant index into statistics for a quest manual stop

See Also:
Constant Field Values

STAT_QUESTACCEPTED

static final int STAT_QUESTACCEPTED
a constant index into statistics for a quest accepted

See Also:
Constant Field Values

STAT_QUESTFAILED

static final int STAT_QUESTFAILED
a constant index into statistics for a quest failed

See Also:
Constant Field Values

STAT_QUESTSUCCESS

static final int STAT_QUESTSUCCESS
a constant index into statistics for a quest success

See Also:
Constant Field Values

STAT_QUESTDROPPED

static final int STAT_QUESTDROPPED
a constant index into statistics for a quest dropped

See Also:
Constant Field Values

STAT_QUESTSTARTATTEMPT

static final int STAT_QUESTSTARTATTEMPT
a constant index into statistics for a manual start

See Also:
Constant Field Values

STAT_SPECIAL_NUMONLINE

static final int STAT_SPECIAL_NUMONLINE
a constant index into statistics for a num players online poll event

See Also:
Constant Field Values
Method Detail

startTime

long startTime()
The start time, in millis since 1970, for this row of data

Returns:
the start time in millis
See Also:
setStartTime(long)

endTime

long endTime()
The end time, in millis since 1970, for this row of data

Returns:
the end time in millis
See Also:
setEndTime(long)

setStartTime

void setStartTime(long time)
Sets the start time, in millis since 1970, for this row of data

Parameters:
time - the start time in millis
See Also:
startTime()

setEndTime

void setEndTime(long time)
Sets the end time, in millis since 1970, for this row of data

Parameters:
time - the end time in millis
See Also:
endTime()

highestOnline

long highestOnline()
Returns the highest number of players online during this period.

Returns:
the highest number of players online

numberOnlineTotal

long numberOnlineTotal()
Returns the cumulative number online during this period per poll. Used to calulate the avg online for the period.

Returns:
the cumulative number online during this period per poll
See Also:
numberOnlineCounter()

numberOnlineCounter

long numberOnlineCounter()
Returns the number of times the number of players online has been polled during this period.

Returns:
number of times the number of players online has been polled
See Also:
numberOnlineTotal()

data

java.lang.String data()
Returns an XML document representing all the information in this object.

Returns:
an xml document
See Also:
populate(long, long, String)

populate

void populate(long start,
              long end,
              java.lang.String data)
Populates this object from an xml document containing relevant statistics.

Parameters:
start - the start time, in millis, for this row of data
end - the end time, in millis, for this row of data
data - the statistics and data for this row, as xml
See Also:
data()

bumpVal

void bumpVal(java.lang.String s,
             int type)
Finds a named statistic of the given name, and increments the value of that long statistic by 1. Requires the event being recorded.

Parameters:
s - the named statistic to record for the given event
type - the type of event to tabulate
See Also:
STAT_LOGINS

bumpVal

void bumpVal(CMObject E,
             int type)
Gathers relevant information about the given Environmental object (usually MOB or Ability) and adds to the relevant statistics. Requires the Environmental object to query, and the event being recorded.

Parameters:
E - the mob or ability
type - the type of event to tabulate
See Also:
STAT_LOGINS

tagFix

java.lang.String tagFix(java.lang.String s)
Simple method that replaces a strings spaces with _ characters, and makes the string uppercase.

Parameters:
s - the string to change
Returns:
the changed string

totalUp

void totalUp(java.lang.String code,
             long[] tot)
Loops through adding all the event stats for the given code string together

Parameters:
code - the code string to use, or *
tot - the running total of all events stats
See Also:
STAT_TOTAL