protected static class LocalHistorianProvider.SyncManager extends java.lang.Object implements DataStore
Modifier and Type | Class and Description |
---|---|
protected class |
LocalHistorianProvider.SyncManager.SyncTransaction |
LOG_NAME_TEMPLATE
Constructor and Description |
---|
SyncManager(Syncable syncable,
HistorianSink sink,
SyncIdTracker idTracker) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptsData(HistoryFlavor dataType)
Returns whether or not the storer can accept the specified type of data.
|
void |
addDataCountChangeListener(java.beans.PropertyChangeListener listener)
Listener will be notified when new data is available for storage.
|
protected void |
fireDatacountChanged() |
int |
getDataCount()
Amount of data in the cache available to be forwarded.
|
java.util.List<DataSinkInformation> |
getInfo()
Gets the information for this sink, as well as any below it.
|
long |
getOldestTimestamp()
Gets the timestamp of the oldest data, in order to calculate how long
data has been present.
|
java.lang.String |
getPipelineName()
Returns the name of the store and forward pipeline that this sink belongs to.
|
QuarantineManager |
getQuarantineManager()
Returns the quarantine interface for the sink.
|
protected long |
getSyncId() |
boolean |
isAccepting()
Returns whether the data store is accepting data.
|
boolean |
isLicensedFor(HistoryFlavor dataType)
Assuming the storer accepts the flavor, is it currently licensed for it? If not, the data will not be stored.
|
protected long |
markSyncIdFinished(long id) |
void |
removeDataCountChangeListener(java.beans.PropertyChangeListener listener) |
void |
shutdown() |
void |
startup() |
void |
storeData(HistoricalData data) |
TransactionSet |
takeNext(boolean wait,
int desiredTransactionSize,
java.util.Date olderThan)
Gets the next set of transactions to run.
|
protected HistoricalData |
toHistoricalData(java.util.List<PathInfo> pathInfo,
ResultDataPoint[] points) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLogName
public SyncManager(Syncable syncable, HistorianSink sink, SyncIdTracker idTracker)
protected long getSyncId()
protected long markSyncIdFinished(long id)
public java.lang.String getPipelineName()
DataSink
getPipelineName
in interface DataSink
public boolean isAccepting()
DataSink
isAccepting
in interface DataSink
public java.util.List<DataSinkInformation> getInfo()
DataSink
public QuarantineManager getQuarantineManager()
DataSink
getQuarantineManager
in interface DataSink
public void storeData(HistoricalData data) throws java.lang.Exception
storeData
in interface HistoryStorer
java.lang.Exception
public boolean acceptsData(HistoryFlavor dataType)
HistoryStorer
acceptsData
in interface HistoryStorer
public boolean isLicensedFor(HistoryFlavor dataType)
HistoryStorer
isLicensedFor
in interface HistoryStorer
public void addDataCountChangeListener(java.beans.PropertyChangeListener listener)
DataStore
addDataCountChangeListener
in interface DataStore
public void removeDataCountChangeListener(java.beans.PropertyChangeListener listener)
removeDataCountChangeListener
in interface DataStore
protected void fireDatacountChanged()
public int getDataCount()
DataStore
getDataCount
in interface DataStore
public long getOldestTimestamp()
DataStore
getOldestTimestamp
in interface DataStore
public TransactionSet takeNext(boolean wait, int desiredTransactionSize, java.util.Date olderThan) throws java.lang.InterruptedException
DataStore
takeNext
in interface DataStore
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.java.lang.InterruptedException
protected HistoricalData toHistoricalData(java.util.List<PathInfo> pathInfo, ResultDataPoint[] points)