Class SamplingAgeManager
- java.lang.Object
-
- com.inductiveautomation.gateway.tags.history.actor.SamplingAgeManager
-
- Direct Known Subclasses:
SamplingAgeManager.ExecCyclesMaxAge
,SamplingAgeManager.TimeBasedAgeManager
public abstract class SamplingAgeManager extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SamplingAgeManager.ExecCyclesMaxAge
static class
SamplingAgeManager.TimeBasedAgeManager
-
Field Summary
Fields Modifier and Type Field Description static SamplingAgeManager
NO_MAX_AGE
-
Constructor Summary
Constructors Constructor Description SamplingAgeManager()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract 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.static SamplingAgeManager
create(PropertySet config)
boolean
equals(java.lang.Object obj)
java.util.List<HistoricalTagValue>
getAndClearPending()
abstract boolean
markNoValuesAndCheckAge()
Returns whether values should be stored due to max age.abstract void
markValuesStored()
Should be called any time values are stored in order to reset any bookkeeping.
-
-
-
Field Detail
-
NO_MAX_AGE
public static final SamplingAgeManager NO_MAX_AGE
-
-
Method Detail
-
markValuesStored
public abstract void markValuesStored()
Should be called any time values are stored in order to reset any bookkeeping. *
-
markNoValuesAndCheckAge
public abstract boolean markNoValuesAndCheckAge()
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.
-
checkMinAge
public abstract long checkMinAge(@Nullable 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. If the return is <=0, the values can be stored.
-
getAndClearPending
@Nullable public java.util.List<HistoricalTagValue> getAndClearPending()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
create
public static SamplingAgeManager create(PropertySet config)
-
-