Package io.deephaven.modelfarm
Interface RowDataManager<KEYTYPE,DATATYPE>
- Type Parameters:
KEYTYPE
- unique ID key typeDATATYPE
- data type
public interface RowDataManager<KEYTYPE,DATATYPE>
An interface for accessing and querying data contained in rows of a dynamic table.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Interface for loading data for extra columns. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Populates a data object with data from a table row.newData()
Creates a new data instance.table()
Gets the source table.uniqueIdCurrent
(long index) Gets the current unique identifier value for a row.uniqueIdPrev
(long index) Gets the previous unique identifier value for a row.
-
Method Details
-
table
Table table()Gets the source table.- Returns:
- source table.
-
newData
DATATYPE newData()Creates a new data instance.- Returns:
- new data instance.
-
uniqueIdCurrent
Gets the current unique identifier value for a row.This function should only be called during an update loop or while holding the UGP lock.
- Parameters:
index
- table row index.- Returns:
- current unique identifier for a row.
-
uniqueIdPrev
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 UGP lock.
- Parameters:
index
- table row index.- Returns:
- previous underlying id.
-
loadData
Populates a data object with data from a table row.This method should be called while the UGP lock is held. This can occur either during the update loop or the UGP lock can be acquired outside the update loop. If the UGP lock is not held, the loaded data can be inconsistent or corrupt.
- Parameters:
data
- data structure to populateindex
- table index of the row to load data fromusePrev
- use data from the previous table update
-