Class SamplingAgeManager.TimeBasedAgeManager
- java.lang.Object
-
- com.inductiveautomation.gateway.tags.history.actor.SamplingAgeManager
-
- com.inductiveautomation.gateway.tags.history.actor.SamplingAgeManager.TimeBasedAgeManager
-
- Enclosing class:
- SamplingAgeManager
public static class SamplingAgeManager.TimeBasedAgeManager extends SamplingAgeManager
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.inductiveautomation.gateway.tags.history.actor.SamplingAgeManager
SamplingAgeManager.ExecCyclesMaxAge, SamplingAgeManager.TimeBasedAgeManager
-
-
Field Summary
-
Fields inherited from class com.inductiveautomation.gateway.tags.history.actor.SamplingAgeManager
NO_MAX_AGE
-
-
Constructor Summary
Constructors Constructor Description TimeBasedAgeManager(long maxMS, long minMS)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
checkMinAge(java.util.List<HistoricalTagValue> values)
Evaluates the min age setting, holding the values as pending and returning a long indicting the nanoseconds until expiration, if applicable.boolean
equals(java.lang.Object obj)
java.util.List<HistoricalTagValue>
getAndClearPending()
boolean
markNoValuesAndCheckAge()
Returns whether values should be stored due to max age.void
markValuesStored()
Should be called any time values are stored in order to reset any bookkeeping.java.lang.String
toString()
-
Methods inherited from class com.inductiveautomation.gateway.tags.history.actor.SamplingAgeManager
create
-
-
-
-
Method Detail
-
getAndClearPending
public java.util.List<HistoricalTagValue> 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
public long checkMinAge(java.util.List<HistoricalTagValue> values)
Description copied from class:SamplingAgeManager
Evaluates the min age setting, holding the values as pending and returning a long indicting the nanoseconds until expiration, if applicable. If the return is <=0, the values can be stored.- Specified by:
checkMinAge
in classSamplingAgeManager
-
markValuesStored
public void 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
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classSamplingAgeManager
-
-