Class RemoteHistorianSink
- java.lang.Object
-
- com.inductiveautomation.ignition.gateway.history.sf.sinks.AbstractSink
-
- com.inductiveautomation.gateway.tags.history.distributed.client.RemoteHistorianSink
-
- All Implemented Interfaces:
DataSink
,HistoryStorer
public class RemoteHistorianSink extends AbstractSink
-
-
Field Summary
-
Fields inherited from class com.inductiveautomation.ignition.gateway.history.sf.sinks.AbstractSink
faulted, faultError, faultTime
-
Fields inherited from interface com.inductiveautomation.ignition.gateway.history.DataSink
LOG_NAME_TEMPLATE
-
-
Constructor Summary
Constructors Constructor Description RemoteHistorianSink(GatewayContext context, com.inductiveautomation.metro.api.ServerId remoteServer, java.lang.String remoteHistoryProvider, java.lang.String pipelineName, int maxGroupSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
acceptsData(HistoryFlavor flavor)
Returns whether or not the storer can accept the specified type of data.protected StorageResult
executeSend(SampleSetProto.SampleSetPB sampleSet)
java.util.List<DataSinkInformation>
getInfo()
Gets the information for this sink, as well as any below it.protected void
initialize()
boolean
isAccepting()
Returns whether the data store is accepting data.boolean
isLicensedFor(HistoryFlavor flavor)
Assuming the storer accepts the flavor, is it currently licensed for it? If not, the data will not be stored.protected java.lang.Object
keyFor(SampleSetProto.TagPB tag)
protected java.lang.Object
keyFor(java.lang.String path, SampleSetProto.ValueModePB mode, SampleSetProto.DataTypePB type)
protected int
qualityToInt(DataQuality q)
protected void
sendScanclassHistorySet(java.util.List<ScanclassHistorySet> sch)
void
startup()
void
storeData(HistoricalData data)
This is where we receive data from the store and forward system, which we will package up and send to the remote side.protected SampleSetProto.SampleSetPB
toSampleSet(TagRetirementList retireList)
protected SampleSetProto.SampleSetPB
toSampleSet(java.util.List<ScanclassHistorySet> sets, boolean allowCache)
protected SampleSetProto.DataTypePB
typeFor(DataTypeClass dtc)
void
updateStatMetrics(java.util.Map<java.lang.String,NamedValue<StatMetric>> statMetrics)
protected SampleSetProto.ValuePB
valueFromHtv(HistoricalTagValue v, java.util.Date timestamp, SampleSetProto.DataTypePB dtype)
-
Methods inherited from class com.inductiveautomation.ignition.gateway.history.sf.sinks.AbstractSink
createLogger, getFaultReason, getLogger, getPipelineName, getQuarantineManager, isFaulted, isInitialized, isStarted, setFaulted, setInitialized, shutdown, tryToInit, uninitialize
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.inductiveautomation.ignition.gateway.history.DataSink
getLogName
-
-
-
-
Constructor Detail
-
RemoteHistorianSink
public RemoteHistorianSink(GatewayContext context, com.inductiveautomation.metro.api.ServerId remoteServer, java.lang.String remoteHistoryProvider, java.lang.String pipelineName, int maxGroupSize)
-
-
Method Detail
-
getInfo
public java.util.List<DataSinkInformation> getInfo()
Description copied from interface:DataSink
Gets the information for this sink, as well as any below it.
-
acceptsData
public boolean acceptsData(HistoryFlavor flavor)
Description copied from interface:HistoryStorer
Returns whether or not the storer can accept the specified type of data.
-
isLicensedFor
public boolean isLicensedFor(HistoryFlavor flavor)
Description copied from interface:HistoryStorer
Assuming the storer accepts the flavor, is it currently licensed for it? If not, the data will not be stored.
-
isAccepting
public boolean isAccepting()
Description copied from interface:DataSink
Returns whether the data store is accepting data.- Specified by:
isAccepting
in interfaceDataSink
- Overrides:
isAccepting
in classAbstractSink
-
updateStatMetrics
public void updateStatMetrics(java.util.Map<java.lang.String,NamedValue<StatMetric>> statMetrics)
-
startup
public void startup()
- Specified by:
startup
in interfaceDataSink
- Overrides:
startup
in classAbstractSink
-
initialize
protected void initialize() throws java.lang.Exception
- Overrides:
initialize
in classAbstractSink
- Throws:
java.lang.Exception
-
storeData
public void storeData(HistoricalData data) throws java.lang.Exception
This is where we receive data from the store and forward system, which we will package up and send to the remote side. It is usually a "data transaction", consisting of potentially multiple ScanclassHistorySets.- Throws:
java.lang.Exception
-
executeSend
protected StorageResult executeSend(SampleSetProto.SampleSetPB sampleSet) throws java.lang.Exception
- Throws:
java.lang.Exception
-
sendScanclassHistorySet
protected void sendScanclassHistorySet(java.util.List<ScanclassHistorySet> sch) throws java.lang.Exception
- Throws:
java.lang.Exception
-
toSampleSet
protected SampleSetProto.SampleSetPB toSampleSet(java.util.List<ScanclassHistorySet> sets, boolean allowCache)
-
toSampleSet
protected SampleSetProto.SampleSetPB toSampleSet(TagRetirementList retireList)
-
keyFor
protected java.lang.Object keyFor(SampleSetProto.TagPB tag)
-
keyFor
protected java.lang.Object keyFor(java.lang.String path, SampleSetProto.ValueModePB mode, SampleSetProto.DataTypePB type)
-
typeFor
protected SampleSetProto.DataTypePB typeFor(DataTypeClass dtc)
-
qualityToInt
protected int qualityToInt(DataQuality q)
-
valueFromHtv
protected SampleSetProto.ValuePB valueFromHtv(HistoricalTagValue v, java.util.Date timestamp, SampleSetProto.DataTypePB dtype)
-
-