Interface RowDataManager<KEYTYPE,​DATATYPE>

Type Parameters:
KEYTYPE - unique ID key type
DATATYPE - data type
All Known Implementing Classes:
EquityFitDataManager, FuturesFitDataManager

public interface RowDataManager<KEYTYPE,​DATATYPE>
An interface for accessing and querying data contained in rows of a dynamic table.
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Interface Description
    static interface  RowDataManager.LoadExtraColumns<DATATYPE>
    Interface for loading data for extra columns.
  • Method Summary

    Modifier and Type Method Description
    void loadData​(DATATYPE data, long index, boolean usePrev)
    Populates a data object with data from a table row.
    DATATYPE newData()
    Creates a new data instance.
    DynamicTable table()
    Gets the source table.
    KEYTYPE uniqueIdCurrent​(long index)
    Gets the current unique identifier value for a row.
    KEYTYPE uniqueIdPrev​(long index)
    Gets the previous unique identifier value for a row.
  • Method Details

    • table

      DynamicTable table()
      Gets the source table.
      Returns:
      source table.
    • newData

      DATATYPE newData()
      Creates a new data instance.
      Returns:
      new data instance.
    • uniqueIdCurrent

      KEYTYPE uniqueIdCurrent​(long index)
      Gets the current unique identifier value for a row.

      This function should only be called during an update loop or while holding the LTM lock.

      Parameters:
      index - table row index.
      Returns:
      current unique identifier for a row.
    • uniqueIdPrev

      KEYTYPE uniqueIdPrev​(long index)
      Gets the previous unique identifier value for a row. One column of each table is designated as a unique identifier for data rows.

      This function should only be called during an update loop or while holding the LTM lock.

      Parameters:
      index - table row index.
      Returns:
      previous underlying id.
    • loadData

      void loadData​(DATATYPE data, long index, boolean usePrev)
      Populates a data object with data from a table row.

      This method should be called while the LTM lock is held. This can occur either during the update loop or the LTM lock can be acquired outside the update loop. If the LTM lock is not held, the loaded data can be inconsistent or corrupt.

      Parameters:
      data - data structure to populate
      index - table index of the row to load data from
      usePrev - use data from the previous table update