Class HistoricalNodeVersionList<N extends HistoricalNode & Comparable<? super N>>
java.lang.Object
com.inductiveautomation.historian.gateway.api.query.HistoricalNodeVersionList<N>
- Type Parameters:
N- theHistoricalNodesubtype stored; itscompareTomust order byHistoricalNode.createdTime()
public class HistoricalNodeVersionList<N extends HistoricalNode & Comparable<? super N>>
extends Object
The versions of one node identity, sorted by created timestamp ascending, with lookups by exact
created timestamp and by point in time.
Versions may be added in any order relative to the existing ones; equal versions (per Object.equals(Object)) at the same created timestamp are kept once.
Thread-safe: reads share a lock and mutations are exclusive.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdds a node in created-timestamp order, skipping it when an equal node already exists at the same created timestamp.findActiveNodeAt(Instant timestamp) Finds the version that was active at the given time.Finds the current version: the newest, provided it has not been retired.findNodeByCreatedTimestamp(Instant createdTimestamp) Finds the version with exactly the given created timestamp.findNodeCoveringTimestamp(Instant timestamp) Finds the version whose[created, retired)interval contains the given time.Returns an immutable snapshot of all versions, sorted by created time.booleanRemoves the given node instance.
-
Constructor Details
-
HistoricalNodeVersionList
-
-
Method Details
-
add
Adds a node in created-timestamp order, skipping it when an equal node already exists at the same created timestamp.- Parameters:
node- the node to add.- Returns:
trueif the node was added,falseif an equal node already existed.
-
getAllNodeVersions
-
findNodeByCreatedTimestamp
-
findActiveNodeAt
-
findCurrentActiveNode
-
remove
Removes the given node instance.- Parameters:
node- the exact instance to remove.- Returns:
trueif the node was removed.
-
findNodeCoveringTimestamp
-