protected class HistoryActorFactory.AtomicHistorizer extends java.lang.Object implements HistoryActorFactory.HistoryActor, Diagnosable
Constructor and Description |
---|
AtomicHistorizer(HistoryActorFactory.EvaluationContainer container,
TagPath path) |
Modifier and Type | Method and Description |
---|---|
ActorClassification |
actorClassification()
The classification of this actor.
|
boolean |
attemptConfiguration(NodeContext context,
VersionedPropertySet config)
Provides an opportunity to update the running actor on the fly.
|
protected void |
configure(PropertySet config) |
void |
configureGroupSettings(TagGroup group) |
void |
destroy(NodeContext context,
ShutdownReason reason)
Override to perform cleanup for actors that have set up extra configuration to process values.
|
java.util.List<HistoricalTagValue> |
generateHtv(java.util.List<QualifiedValue> values) |
void |
getBrowseTraits(java.util.List<NodeAttribute> attributes)
Gives the actor a chance to report NodeAttribute traits for the tag it belongs to.
|
protected boolean |
hasChanged(PropertySet config,
java.util.Collection<Property<?>> props) |
protected boolean |
hasChanged(PropertySet config,
Property<?> prop) |
void |
initialize(NodeContext context,
PropertySet config)
Override to set up any extra configuration that is needed before the actor can process a value.
|
QualifiedValue |
processValue(QualifiedValue value)
The value is generated by the source actor and then passed along to the next actor.
|
void |
sampleDiagnostics(DiagnosticsSample sample)
Provides the sample upon which the object can set diagnostics information.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBrowsableProperties, onLeasedChanged, onPathChanged
public AtomicHistorizer(HistoryActorFactory.EvaluationContainer container, TagPath path)
public ActorClassification actorClassification()
TagActor
actorClassification
in interface TagActor
protected boolean hasChanged(PropertySet config, Property<?> prop)
protected boolean hasChanged(PropertySet config, java.util.Collection<Property<?>> props)
public void initialize(NodeContext context, PropertySet config)
TagActor
initialize
in interface TagActor
public boolean attemptConfiguration(NodeContext context, VersionedPropertySet config)
TagActor
Therefore, the implementation should also verify that the configuration is still valid for this actor.
The config object provide is the entire configuration for the tag. However, it is provided as a Diff, which is relative to the last time configuration was attempted. This allows actors to quickly see if relevant properties have changed. Many actors will choose to simply rebuild themselves if the properties have changed, but given how often this function is called, it's important not to rebuild unnecessarily (hence, check the changed properties).
attemptConfiguration
in interface TagActor
public void configureGroupSettings(TagGroup group)
configureGroupSettings
in interface HistoryActorFactory.HistoryActor
protected void configure(PropertySet config)
public java.util.List<HistoricalTagValue> generateHtv(java.util.List<QualifiedValue> values)
public QualifiedValue processValue(QualifiedValue value)
TagActor
processValue
in interface TagActor
public void destroy(NodeContext context, ShutdownReason reason)
TagActor
public void sampleDiagnostics(DiagnosticsSample sample)
Diagnosable
sampleDiagnostics
in interface Diagnosable
public void getBrowseTraits(java.util.List<NodeAttribute> attributes)
TagActor
getBrowseTraits
in interface TagActor