Class BasicScanclassHistorySet
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<HistoricalTagValue>
com.inductiveautomation.ignition.gateway.sqltags.model.BasicScanclassHistorySet
- All Implemented Interfaces:
GroupableData
,HistoricalData
,HistoricalDataList
,RetryHistoricalData
,ScanclassHistorySet
,Serializable
,Cloneable
,Iterable<HistoricalTagValue>
,Collection<HistoricalTagValue>
,List<HistoricalTagValue>
,RandomAccess
public class BasicScanclassHistorySet
extends ArrayList<HistoricalTagValue>
implements ScanclassHistorySet, GroupableData
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.inductiveautomation.ignition.gateway.history.RetryHistoricalData
RetryHistoricalData.RetryState
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
ConstructorsConstructorDescriptionBasicScanclassHistorySet
(String providerName, String scName, int execRate) BasicScanclassHistorySet
(String gatewayName, String providerName, String scName, int execRate) -
Method Summary
Modifier and TypeMethodDescriptionboolean
protected void
badData()
void
Removes data flagged as badboolean
copy()
int
This is a fairly ambiguous number, but basically indicates how many rows will ultimately be inserted in the database.int
The rate that the scan class is executing at.The very broad "flavor" designator, used to get the data to the correct sink.Returns the name of the source gateway.A string identifing the "group" of the data.Returns the name of the logger that should be notified when something happens to this data.Returns the name of the tag provider that generated this set.The name of the scan classThe signature is a static string that describes this data as uniquely as possible.groupData
(GroupableData other) Merge another piece of similar data into this one.void
Marks all RetryHistoricalData values as badvoid
markAsBad
(HistoricalTagValue value) boolean
void
setExecutionTime
(Date execTime) void
setFailureReason
(Exception failureReason) void
toString()
Methods inherited from class java.util.ArrayList
add, addAll, addAll, clear, clone, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
Methods inherited from class java.util.AbstractCollection
containsAll
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
add, addAll, addAll, clear, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
Constructor Details
-
BasicScanclassHistorySet
-
BasicScanclassHistorySet
-
-
Method Details
-
copy
-
getLoggerName
Description copied from interface:HistoricalData
Returns the name of the logger that should be notified when something happens to this data. If null or empty, notifications won't occur (errors, however, may still be logged to the general logger).- Specified by:
getLoggerName
in interfaceHistoricalData
-
getFlavor
Description copied from interface:HistoricalData
The very broad "flavor" designator, used to get the data to the correct sink. That is, different sinks support different types of data, and this is used to match them up.- Specified by:
getFlavor
in interfaceHistoricalData
-
getSignature
Description copied from interface:HistoricalData
The signature is a static string that describes this data as uniquely as possible. This will be used to group data in the data cache (for example, when displaying quarantined data), as well as uniquely identifying cacheable schemas, etc.Basically, the golden rule is that if two pieces of data have the same signature, the came from the same place, and are going to the same place, and in theory could be grouped together (note: they won't be, that is done with the
GroupableData
interface).- Specified by:
getSignature
in interfaceHistoricalData
-
getDataCount
public int getDataCount()Description copied from interface:HistoricalData
This is a fairly ambiguous number, but basically indicates how many rows will ultimately be inserted in the database. Used for judging transaction size.- Specified by:
getDataCount
in interfaceHistoricalData
-
getExecRate
public int getExecRate()Description copied from interface:ScanclassHistorySet
The rate that the scan class is executing at. Returns 0 to indicate a non-direct scan class (one that doesn't execute regularly)- Specified by:
getExecRate
in interfaceScanclassHistorySet
-
getExecutionTime
- Specified by:
getExecutionTime
in interfaceScanclassHistorySet
-
setExecutionTime
-
getSetName
Description copied from interface:ScanclassHistorySet
The name of the scan class- Specified by:
getSetName
in interfaceScanclassHistorySet
-
getProviderName
Description copied from interface:ScanclassHistorySet
Returns the name of the tag provider that generated this set.- Specified by:
getProviderName
in interfaceScanclassHistorySet
-
getGatewayName
Description copied from interface:ScanclassHistorySet
Returns the name of the source gateway. If null, it is the local gateway.- Specified by:
getGatewayName
in interfaceScanclassHistorySet
-
markAllAsBad
public void markAllAsBad()Description copied from interface:RetryHistoricalData
Marks all RetryHistoricalData values as bad- Specified by:
markAllAsBad
in interfaceRetryHistoricalData
-
markAsBad
- Specified by:
markAsBad
in interfaceRetryHistoricalData
- Parameters:
value
-HistoricalTagValue
that store wasn't able to process
-
clearBadData
public void clearBadData()Description copied from interface:RetryHistoricalData
Removes data flagged as bad- Specified by:
clearBadData
in interfaceRetryHistoricalData
-
badData
- Specified by:
badData
in interfaceRetryHistoricalData
- Returns:
- Copy of the
HistoricalData
containing only data that was marked as bad or null if no data is added
-
setRetry
- Specified by:
setRetry
in interfaceRetryHistoricalData
-
retryState
- Specified by:
retryState
in interfaceRetryHistoricalData
-
retryEnabled
public boolean retryEnabled()- Specified by:
retryEnabled
in interfaceRetryHistoricalData
-
setFailureReason
- Specified by:
setFailureReason
in interfaceRetryHistoricalData
-
failureReason
- Specified by:
failureReason
in interfaceRetryHistoricalData
-
toString
- Overrides:
toString
in classAbstractCollection<HistoricalTagValue>
-
add
- Specified by:
add
in interfaceCollection<HistoricalTagValue>
- Specified by:
add
in interfaceList<HistoricalTagValue>
- Overrides:
add
in classArrayList<HistoricalTagValue>
-
addToCache
-
contains
- Specified by:
contains
in interfaceCollection<HistoricalTagValue>
- Specified by:
contains
in interfaceList<HistoricalTagValue>
- Overrides:
contains
in classArrayList<HistoricalTagValue>
-
getGroupId
Description copied from interface:GroupableData
A string identifing the "group" of the data. In other words, any piece of data from this group can be merged together.- Specified by:
getGroupId
in interfaceGroupableData
-
groupData
Description copied from interface:GroupableData
Merge another piece of similar data into this one.- Specified by:
groupData
in interfaceGroupableData
-