C# Class qXL.DataCache

Datei anzeigen Open project: exxeleron/qXL

Public Methods

Method Description
ChangeHistoryLength ( int newLength ) : void

Changes history size to be kept in memory. In case the history is made shorter data that is now found behind the history window will be deleted.

DataCache ( int historyLength ) : System

Simple constructor allowing initialization of history length.

GetData ( string alias, string table, string symbol, string column, string historyLvl ) : object

Simple data getter. Allows to retrieve data from given history level, e.g.: "-2" In case data is missing will return null.

GetHistoryLength ( ) : int

UpdateData ( string alias, string table, string symbol, string column, object data ) : void

Function for updating data in memory. Automatically rewinds data for historical values.

Private Methods

Method Description
GetData ( string alias, string table, string symbol, string column ) : object

Simple data getter. Does not take history into account, so for history fetching overloaded version of this function should be used. In case data is missing will return null.

RewindData ( string alias, string table, string symbol, string column ) : void

Function for shifting data in history. In case we have a history set to 5 this function will: 1. re-write 4th value to 5th position 2. re-write 3rd value to 4th position 3. re-write 2nd value to 3rd position 4. re-write 1st value to 2nd position

Method Details

ChangeHistoryLength() public method

Changes history size to be kept in memory. In case the history is made shorter data that is now found behind the history window will be deleted.
public ChangeHistoryLength ( int newLength ) : void
newLength int new length of the history vector
return void

DataCache() public method

Simple constructor allowing initialization of history length.
public DataCache ( int historyLength ) : System
historyLength int amout of history positions that should be kept per symbol
return System

GetData() public method

Simple data getter. Allows to retrieve data from given history level, e.g.: "-2" In case data is missing will return null.
public GetData ( string alias, string table, string symbol, string column, string historyLvl ) : object
alias string connection alias
table string table name
symbol string symbol
column string column
historyLvl string /// "position" in history relative to "current" value, e.g.: "-1","-2" would mean previous and /// previous previous value respectively ///
return object

GetHistoryLength() public method

public GetHistoryLength ( ) : int
return int

UpdateData() public method

Function for updating data in memory. Automatically rewinds data for historical values.
public UpdateData ( string alias, string table, string symbol, string column, object data ) : void
alias string connection alias
table string table name
symbol string symbol name
column string column name
data object data to be stored on most recent("current") position
return void