|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.isti.trinetwatch.station.StationLevelsCache
public class StationLevelsCache
Class StationLevelsCache manages a cache of station-levels entry objects.
| Field Summary | |
|---|---|
protected long |
cacheBaseTimeVal
|
protected java.util.Vector |
entriesListObj
|
protected StatusLevelTable |
statusLevelTableObj
|
protected UsageLevelTable |
usageLevelTableObj
|
| Constructor Summary | |
|---|---|
StationLevelsCache(long baseTimeVal,
StatusLevelTable sLevelTableObj,
UsageLevelTable uLevelTableObj)
Creates a cache of station-levels entry objects. |
|
| Method Summary | |
|---|---|
void |
addEntry(long timeVal,
StatusLevelTag sLevelObj,
UsageLevelTag uLevelObj)
Adds an entry to the cache. |
StationLevelsEntry |
get(int idx)
Fetches the entry object at the given index in the cache. |
java.lang.String |
getLevelsAtTimeStr(long timeVal)
Returns a string containing the status and usage level names for the given time value. |
void |
purgeOldEntries(long timeVal)
Purges entries from the cache that are older than the given time value. |
int |
size()
Returns the number of entries in the cache. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final long cacheBaseTimeVal
protected final StatusLevelTable statusLevelTableObj
protected final UsageLevelTable usageLevelTableObj
protected final java.util.Vector entriesListObj
| Constructor Detail |
|---|
public StationLevelsCache(long baseTimeVal,
StatusLevelTable sLevelTableObj,
UsageLevelTable uLevelTableObj)
baseTimeVal - base time value for cache (seconds since 1/1/1970).sLevelTableObj - status-level table for cache.uLevelTableObj - usage-level table for cache.| Method Detail |
|---|
public void addEntry(long timeVal,
StatusLevelTag sLevelObj,
UsageLevelTag uLevelObj)
throws java.lang.IllegalArgumentException
timeVal - time value associated with levels (seconds since
1/1/1970).sLevelObj - status-level object.uLevelObj - usage-level object.
java.lang.IllegalArgumentException - if index value for given status or
usage level is out of range.public java.lang.String getLevelsAtTimeStr(long timeVal)
timeVal - requested time value (seconds since 1/1/1970).
public void purgeOldEntries(long timeVal)
timeVal - purge time value (seconds since 1/1/1970).public int size()
public StationLevelsEntry get(int idx)
idx - index value to use.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||