Class ParameterGroupIdDb

java.lang.Object
org.yamcs.parameterarchive.ParameterGroupIdDb

public class ParameterGroupIdDb extends Object
Stores a map between List<parameter_id> and ParameterGroup_id.

Stores data in the main tablespace:

database key = tbsIndex,ParameterGroup_id

datbase value = SortedIntArray of parameter_id, stored delta encoded

Backed by RocksDB

  • Method Details

    • getGroup

      public ParameterGroupIdDb.ParameterGroup getGroup(IntArray input) throws org.rocksdb.RocksDBException
      Returns the ParameterGroup for the given parameter id array, creating it if it does not exist yet

      If a group matching the array exists, it is returned.

      If it does not exist and sparseGroup is disabled, then a new group is made.

      If sparseGroup is enabled, then a group overlapping the input array is searched. If no existing group matches half of the input array, then a new group is created for the input array.

      If an existing group overlapping the input array is found, then there are two cases:

      • The existing group contains all the entries from the input array. Then it is simply returned.
      • The existing group misses some entries from the input array. In this case the group is extended with the missing entries, then it is returned.
      Throws:
      org.rocksdb.RocksDBException
    • getParameterGroup

      public IntArray getParameterGroup(int pg)
      return the members of the pg group.

      Throws IllegalArgumentException if the group does not exist

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getAllGroups

      public int[] getAllGroups(int pid)
      get all parameter group ids for the parameters from which this parameter id is part of
      Parameters:
      pid -
      Returns:
      the parameter group ids for the parameters groups that contain the pid