Package org.cdlib.mrt.utility
Class TallyTable
java.lang.Object
org.cdlib.mrt.utility.TallyTable
Generalized counting queue
Copied - DLoy
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongaddDiffTime(String key, long from) Add difference in time from arg to nowvoidincrement a counter with this name by 1 and savevoidincrement a counter with this name and savevoidbump(TallyTable inCount) increment counts using another CountQueuevoidclear()dump()increment a counter with this name and savedumpProp()increment a counter with this name and savelongGet the count for this keyString[]Build sorted array of tally keyslonggetTime()Add difference in time from arg to nowvoidLoad tally count from filevoidvoidset tally valueintsize()number of tally items
-
Field Details
-
NAME
- See Also:
-
MESSAGE
- See Also:
-
LS
-
queue
-
-
Constructor Details
-
TallyTable
public TallyTable()
-
-
Method Details
-
bump
increment counts using another CountQueue- Parameters:
inCount- CountQueue to be added
-
bump
increment a counter with this name by 1 and save- Parameters:
name- of the counter to be incremented
-
bump
increment a counter with this name and save- Parameters:
name- of the counter to be incrementedamount- to bump counter
-
set
set tally value- Parameters:
name- of the counter to be incrementedamount- to bump counter
-
clear
public void clear() -
addDiffTime
Add difference in time from arg to now- Parameters:
key- - name of key to be incrementedfrom- start time value- Returns:
- current time
-
divide
-
getValue
-
getTime
public long getTime()Add difference in time from arg to now- Parameters:
key- - name of key to be incrementedfrom- start time value- Returns:
- current time
-
dump
increment a counter with this name and save- Parameters:
name- of the counter to be incrementedamount- to bump counter
-
dumpProp
increment a counter with this name and save- Parameters:
name- of the counter to be incrementedamount- to bump counter
-
getCountKeys
Build sorted array of tally keys- Returns:
-
getCount
Get the count for this key- Parameters:
key- key used for extracting tally count- Returns:
- tally count
-
size
public int size()number of tally items- Returns:
- number of tally items
-
loadTable
Load tally count from file- Parameters:
loadFile- file to be loaded for tally- Throws:
TException
-
getAsProperties
-
saveTable
- Throws:
TException
-
getTallyMap
-