Class SamplingAgeManager.TimeBasedAgeManager
java.lang.Object
com.inductiveautomation.historian.gateway.tags.actor.SamplingAgeManager
com.inductiveautomation.historian.gateway.tags.actor.SamplingAgeManager.TimeBasedAgeManager
- All Implemented Interfaces:
Diagnosable
- Enclosing class:
- SamplingAgeManager
public static class SamplingAgeManager.TimeBasedAgeManager
extends SamplingAgeManager
implements Diagnosable
This manages time based storage throttling.
The trick to this class is that it's all based on the timestamps of the values that pass through, so that no
matter how the data flows, we adhere to the expectation defined by the settings.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.inductiveautomation.historian.gateway.tags.actor.SamplingAgeManager
SamplingAgeManager.ExecCyclesMaxAge, SamplingAgeManager.TimeBasedAgeManager
-
Field Summary
FieldsFields inherited from class com.inductiveautomation.historian.gateway.tags.actor.SamplingAgeManager
NO_MAX_AGE
-
Constructor Summary
ConstructorsConstructorDescriptionTimeBasedAgeManager
(long maxMS, long minMS) TimeBasedAgeManager
(Clock testClock, long maxMS, long minMS) -
Method Summary
Modifier and TypeMethodDescriptionlong
checkMinAge
(List<QualifiedValue> values) Evaluates the min age setting, holding the values as pending and returning a long indicting the milliseconds until expiration, if applicable.boolean
boolean
Returns whether values should be stored due to max age.void
markValuesStored
(Date lastTS) Should be called any time values are stored in order to reset any bookkeeping.void
sampleDiagnostics
(DiagnosticsSample sample) Provides the sample upon which the object can set diagnostics information.toString()
Methods inherited from class com.inductiveautomation.historian.gateway.tags.actor.SamplingAgeManager
create
-
Field Details
-
clock
-
-
Constructor Details
-
TimeBasedAgeManager
-
TimeBasedAgeManager
public TimeBasedAgeManager(long maxMS, long minMS)
-
-
Method Details
-
getAndClearPending
- Overrides:
getAndClearPending
in classSamplingAgeManager
-
markNoValuesAndCheckAge
public boolean markNoValuesAndCheckAge()Description copied from class:SamplingAgeManager
Returns whether values should be stored due to max age. The caller should then call markValuesStored() after to let it know that values where stored.- Specified by:
markNoValuesAndCheckAge
in classSamplingAgeManager
-
checkMinAge
Description copied from class:SamplingAgeManager
Evaluates the min age setting, holding the values as pending and returning a long indicting the milliseconds until expiration, if applicable. If the return is <=0, the values can be stored.- Specified by:
checkMinAge
in classSamplingAgeManager
-
markValuesStored
Description copied from class:SamplingAgeManager
Should be called any time values are stored in order to reset any bookkeeping. *- Specified by:
markValuesStored
in classSamplingAgeManager
-
sampleDiagnostics
Description copied from interface:Diagnosable
Provides the sample upon which the object can set diagnostics information. It is expected that the calling object will first callgetSubSample()
in order to specify a useful identifier for this object's data.- Specified by:
sampleDiagnostics
in interfaceDiagnosable
-
toString
-
equals
- Overrides:
equals
in classSamplingAgeManager
-