Interface DataStore
- All Superinterfaces:
- DataSink,- HistoryStorer
A DataStore is an intermediate data sink - ie, the "store" part of
 "store and forward". Therefore, it takes data in as HistoricalData (through
 the DataSink interface), and then produces ForwardTransactions, which can be
 forwarded along.
- 
Field SummaryFields inherited from interface com.inductiveautomation.ignition.gateway.history.DataSinkLOG_NAME_TEMPLATE
- 
Method SummaryModifier and TypeMethodDescriptionvoidListener will be notified when new data is available for storage.intAmount of data in the cache available to be forwarded.longGets the timestamp of the oldest data, in order to calculate how long data has been present.voidGets the next set of transactions to run.Methods inherited from interface com.inductiveautomation.ignition.gateway.history.DataSinkgetInfo, getLogName, getPipelineName, getQuarantineManager, isAccepting, shutdown, startupMethods inherited from interface com.inductiveautomation.ignition.gateway.history.HistoryStoreracceptsData, isLicensedFor, storeData
- 
Method Details- 
addDataCountChangeListenerListener will be notified when new data is available for storage.
- 
removeDataCountChangeListener
- 
getDataCountint getDataCount()Amount of data in the cache available to be forwarded. This value cannot be trusted to be 100% accurate, it could be an estimation, and could return negative values if the cache thinks nothing is available or does not yet know how many points are available.
- 
getOldestTimestamplong getOldestTimestamp()Gets the timestamp of the oldest data, in order to calculate how long data has been present. Does not look at quarantined data. Returns Long.MaxValue if there is no value available (because that will be in the future, and thus not old).
- 
takeNext@Nullable TransactionSet takeNext(boolean wait, int desiredTransactionSize, @Nullable Date olderThan) throws InterruptedException Gets the next set of transactions to run.- Parameters:
- wait- whether to block until data is available. If false, or if an olderThan parameter is provided, will return null if no data is present.
- desiredTransactionSize- the desired size of data in the transactions. ONLY A HINT! Stores are free to return whatever they think is best. If -1, it's left to the store's discretion (usually will return 1 at a time)
- olderThan- If null, not used. Otherwise only returns data older than the given value. Returns null if there is no old data available.
- Throws:
- InterruptedException
 
 
-