- All Implemented Interfaces:
AutoCloseable,ParchiveIterator<ParameterValueSegment>
Provides objects of type ParameterValueSegment which contain multiple values of one parameter - suitable to
be used for bulk processing (e.g. downsampling or averaging).
The ParameterIterator can be used to iterate over parameters value by value (at the expense of
consuming more memory)
This iterator works like a Rocks iterator (with isValid(), next(), and value()) not like a java one. The advantage is that one can look at the current value multiple times. This property is used when merging the iterators using a priority queue.
The iterator has to be closed if it is not used until the end, otherwise a rocks iterator may be left hanging
Note about the raw values retrieval: the retrieval assumes that if raw values are requested, the parameter has raw values (this can be known from the type associated to the parameter id).
Thus, if the raw values are requested and not found in the archive, the engineering values are returned as raw values. This is an optimisation done in case the two are equal.
The iterator also sends data from RealtimeFiller if that is enabled.
-
Constructor Summary
ConstructorsConstructorDescriptionSegmentIterator(ParameterArchive parchive, ParameterId parameterId, int parameterGroupId, ParameterRequest req) -
Method Summary
-
Constructor Details
-
SegmentIterator
public SegmentIterator(ParameterArchive parchive, ParameterId parameterId, int parameterGroupId, ParameterRequest req)
-
-
Method Details
-
isValid
public boolean isValid()- Specified by:
isValidin interfaceParchiveIterator<ParameterValueSegment>
-
value
- Specified by:
valuein interfaceParchiveIterator<ParameterValueSegment>
-
next
public void next()- Specified by:
nextin interfaceParchiveIterator<ParameterValueSegment>
-
close
public void close()Close the underlying rocks iterator if not already closed- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceParchiveIterator<ParameterValueSegment>
-
getParameterGroupId
public int getParameterGroupId() -
getParameterId
-