public class PointValueCache
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.List<PointValueTime> |
cache
IMPORTANT: The list object should never be written to!
|
private PointValueDao |
dao |
private int |
dataPointId |
private int |
defaultSize |
private static org.apache.commons.logging.Log |
LOG |
private int |
maxSize |
Constructor and Description |
---|
PointValueCache(int dataPointId,
int defaultSize) |
Modifier and Type | Method and Description |
---|---|
java.util.List<PointValueTime> |
getCacheContents()
Never manipulate the contents of this list!
|
PointValueTime |
getLatestPointValue() |
java.util.List<PointValueTime> |
getLatestPointValues(int limit) |
(package private) void |
logPointValueAsync(PointValueTime pointValue,
SetPointSource source)
Saves the given value to the database without adding it to the cache.
|
private void |
refreshCache(int size) |
void |
reset() |
void |
savePointValue(PointValueTime pvt,
SetPointSource source,
boolean logValue,
boolean async) |
private static final org.apache.commons.logging.Log LOG
private final int dataPointId
private final int defaultSize
private final PointValueDao dao
private java.util.List<PointValueTime> cache
private int maxSize
public void savePointValue(PointValueTime pvt, SetPointSource source, boolean logValue, boolean async)
void logPointValueAsync(PointValueTime pointValue, SetPointSource source)
public PointValueTime getLatestPointValue()
public java.util.List<PointValueTime> getLatestPointValues(int limit)
private void refreshCache(int size)
public java.util.List<PointValueTime> getCacheContents()
public void reset()