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 Type
    Method
    Description
    void
    add(Value engValue)
    Add data at the end of the segment.
    void
    Optimise the segment data for writing to the archive
    getRange(int posStart, int posStop, boolean ascending)
    returns an array containing the values in the range [posStart, posStop) if ascending or [posStop, posStart) if descending
    getValue(int index)
    returns Value at position index
    void
    insert(int pos, Value engValue)
    Insert data at position pos.
    int
     
  • Method Details

    • getValue

      Value getValue(int index)
      returns Value at position index
      Parameters:
      index -
      Returns:
      the value at the index
    • insert

      void insert(int pos, Value engValue)
      Insert data at position pos. The data at the subsequent positions is shifted to the right.
    • add

      void add(Value engValue)
      Add data at the end of the segment.
    • consolidate

      void consolidate()
      Optimise the segment data for writing to the archive

      After this method is called, no more data can be added to the segment

    • size

      int size()
    • getRange

      ValueArray getRange(int posStart, int posStop, boolean ascending)
      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