Class SyntheticFlowTimestampPolicy.WithLimitedDelay
- java.lang.Object
-
- org.opennms.nephron.testing.flowgen.SyntheticFlowTimestampPolicy
-
- org.opennms.nephron.testing.flowgen.SyntheticFlowTimestampPolicy.WithLimitedDelay
-
- Enclosing class:
- SyntheticFlowTimestampPolicy
public static class SyntheticFlowTimestampPolicy.WithLimitedDelay extends SyntheticFlowTimestampPolicy
Inspired byCustomTimestampPolicyWithLimitedDelay
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opennms.nephron.testing.flowgen.SyntheticFlowTimestampPolicy
SyntheticFlowTimestampPolicy.WithLimitedDelay
-
-
Constructor Summary
Constructors Constructor Description WithLimitedDelay(org.joda.time.Duration maxDelay, org.apache.beam.sdk.transforms.SerializableFunction<org.opennms.netmgt.flows.persistence.model.FlowDocument,org.joda.time.Instant> timestampFunction, Optional<org.joda.time.Instant> previousMaxEventTimestamp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.joda.time.InstantgetCheckpointInstant()Returns the time instant that is stored inFlowReader.CheckpointMarkinstances.org.joda.time.InstantgetTimestampForFlow(org.opennms.netmgt.flows.persistence.model.FlowDocument fd)Side effecting method that returns the timestamp for a flow document.org.joda.time.InstantgetWatermark()Returns the estimation of the current watermark.
-
-
-
Constructor Detail
-
WithLimitedDelay
public WithLimitedDelay(org.joda.time.Duration maxDelay, org.apache.beam.sdk.transforms.SerializableFunction<org.opennms.netmgt.flows.persistence.model.FlowDocument,org.joda.time.Instant> timestampFunction, Optional<org.joda.time.Instant> previousMaxEventTimestamp)
-
-
Method Detail
-
getTimestampForFlow
public org.joda.time.Instant getTimestampForFlow(org.opennms.netmgt.flows.persistence.model.FlowDocument fd)
Description copied from class:SyntheticFlowTimestampPolicySide effecting method that returns the timestamp for a flow document. A timestamp policy may track the observed flow documents in order to update its watermark estimation.- Specified by:
getTimestampForFlowin classSyntheticFlowTimestampPolicy
-
getWatermark
public org.joda.time.Instant getWatermark()
Description copied from class:SyntheticFlowTimestampPolicyReturns the estimation of the current watermark.- Specified by:
getWatermarkin classSyntheticFlowTimestampPolicy
-
getCheckpointInstant
public org.joda.time.Instant getCheckpointInstant()
Description copied from class:SyntheticFlowTimestampPolicyReturns the time instant that is stored inFlowReader.CheckpointMarkinstances. Different timestamp policies may return different time instances, e.g. the current watermark or the maximum observed flow timestamp.- Specified by:
getCheckpointInstantin classSyntheticFlowTimestampPolicy
-
-