Class NonCompressor
- java.lang.Object
-
- com.inductiveautomation.gateway.tags.history.actor.compression.NonCompressor
-
- All Implemented Interfaces:
ValueCompressor
public class NonCompressor extends java.lang.Object implements ValueCompressor
A compressor that doesn't actually compress. It does, however, only emit values when they've changed at all. Flush will return the last emitted value.
-
-
Constructor Summary
Constructors Constructor Description NonCompressor(InterpolationMode dbMode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<QualifiedValue>
flush()
Tells the compressor to return any values it can.InterpolationMode
getDeadbandMode()
java.util.List<QualifiedValue>
putValue(QualifiedValue value)
Places a value into the compressor to be processed.protected void
updateValue(QualifiedValue value)
-
-
-
Constructor Detail
-
NonCompressor
public NonCompressor(InterpolationMode dbMode)
-
-
Method Detail
-
getDeadbandMode
public InterpolationMode getDeadbandMode()
- Specified by:
getDeadbandMode
in interfaceValueCompressor
-
updateValue
protected void updateValue(QualifiedValue value)
-
putValue
public java.util.List<QualifiedValue> putValue(QualifiedValue value)
Description copied from interface:ValueCompressor
Places a value into the compressor to be processed. Any available processed values are returned. Will return an empty list if no values should be emitted (will not return null).Important: For performance reasons, the list returned may be the same object between calls. Therefore, it should not be held onto. The values should be utilized directly after calling this function.
- Specified by:
putValue
in interfaceValueCompressor
-
flush
public java.util.List<QualifiedValue> flush()
Description copied from interface:ValueCompressor
Tells the compressor to return any values it can. Can be used before shutdown, or when the max-age has been reached in order to force values to be written.Important: For performance reasons, the list returned may be the same object between calls. Therefore, it should not be held onto. The values should be utilized directly after calling this function.
- Specified by:
flush
in interfaceValueCompressor
-
-