Package org.yamcs.parameterarchive
Interface ValueSegment
- All Known Implementing Classes:
BinaryValueSegment
,BooleanValueSegment
,DoubleValueSegment
,FloatValueSegment
,IntValueSegment
,LongValueSegment
,StringValueSegment
public interface ValueSegment
Interface for segments of columnar data.
Given that all data from one segment is of the same type, the implementors can make use of arrays to store data more efficiently.
As of Yamcs 5.9.4 Yamcs supports sparse data in parameter archive. This interface and its implementors do not deal
with gaps, they store only the data. The mapping from the original data with gaps to this is done in the
ParameterValueSegment
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add data at the end of the segment.void
Optimise the segment data for writing to the archivegetRange
(int posStart, int posStop, boolean ascending) returns an array containing the values in the range [posStart, posStop) if ascending or [posStop, posStart) if descendinggetValue
(int index) returns Value at position indexvoid
Insert data at position pos.default void
In rare circumstances, a segment read from the archive has to be modified.int
size()
-
Method Details
-
getValue
returns Value at position index- Parameters:
index
-- Returns:
- the value at the index
-
insert
Insert data at position pos. The data at the subsequent positions is shifted to the right. -
add
Add data at the end of the segment. -
consolidate
void consolidate()Optimise the segment data for writing to the archiveAfter this method is called, no more data can be added to the segment
-
size
int size() -
makeWritable
default void makeWritable()In rare circumstances, a segment read from the archive has to be modified.This method updates the object such that it can be modified
-
getRange
returns an array containing the values in the range [posStart, posStop) if ascending or [posStop, posStart) if descending- Parameters:
posStart
-posStop
-ascending
-- Returns:
- an array containing the values in the specified range
-