java.lang.Object
org.yamcs.parameter.ArrayParameterCache
- All Implemented Interfaces:
ParameterCache
This is another implementation of the parameter cache using arrays to store primitive values (instead of storing
Value).-
Method Summary
Modifier and TypeMethodDescriptionbooleancaching(ParameterWithId pid) voidclear()Remove all the parameters from the cachegetAllValues(List<org.yamcs.xtce.Parameter> parameters, long start, long stop) getAllValues(org.yamcs.xtce.Parameter pdef) Returns all values from the cache for the parameter or null if there is no value cached The parameter are returned in descending order (newest parameter is returned first)getAllValues(org.yamcs.xtce.Parameter pdef, long start, long stop) Same as above but return all values that have the generation time in the (start, stop] intervalgetAllValuesIfCovered(List<org.yamcs.xtce.Parameter> parameters, long start, long stop) getAllValuesIfCovered(org.yamcs.xtce.Parameter pdef, long start, long stop) This is the same as above but returns null if the cache does not cover the interval starting with start.getLastValue(org.yamcs.xtce.Parameter pdef) Returns last cached value for parameter or null if there is no value in the cacheReturns cached value for parameter or an empty list if there is no value in the cachevoidupdate(Collection<ParameterValue> pvs) update the parameters in the cache
-
Method Details
-
update
Description copied from interface:ParameterCacheupdate the parameters in the cache- Specified by:
updatein interfaceParameterCache- Parameters:
pvs- - parameter value list
-
getLastValue
Description copied from interface:ParameterCacheReturns last cached value for parameter or null if there is no value in the cache- Specified by:
getLastValuein interfaceParameterCache- Parameters:
pdef- - parameter for which the last value is returned- Returns:
-
getValues
Description copied from interface:ParameterCacheReturns cached value for parameter or an empty list if there is no value in the cache- Specified by:
getValuesin interfaceParameterCache- Returns:
-
getAllValues
Description copied from interface:ParameterCacheReturns all values from the cache for the parameter or null if there is no value cached The parameter are returned in descending order (newest parameter is returned first)- Specified by:
getAllValuesin interfaceParameterCache- Parameters:
pdef- - parameter for which all values are returned- Returns:
- all values from the cache for the parameter or null if there is no value cached
-
getAllValues
Description copied from interface:ParameterCacheSame as above but return all values that have the generation time in the (start, stop] interval- Specified by:
getAllValuesin interfaceParameterCache- Returns:
-
getAllValuesIfCovered
public List<ParameterValue> getAllValuesIfCovered(org.yamcs.xtce.Parameter pdef, long start, long stop) This is the same as above but returns null if the cache does not cover the interval starting with start. -
getAllValues
public List<List<ParameterValue>> getAllValues(List<org.yamcs.xtce.Parameter> parameters, long start, long stop) -
getAllValuesIfCovered
public List<List<ParameterValue>> getAllValuesIfCovered(List<org.yamcs.xtce.Parameter> parameters, long start, long stop) -
clear
public void clear()Description copied from interface:ParameterCacheRemove all the parameters from the cache- Specified by:
clearin interfaceParameterCache
-
caching
- Specified by:
cachingin interfaceParameterCache
-