Class BoundingSearchWindow
BoundingOptions.lookback() and BoundingOptions.lookforward().
A bounding read asks for the nearest stored sample beyond a range boundary, and how far away
it sits depends on whether the tag is still logging, not on the query. pick(Duration) therefore
searches the whole permitted horizon unless the caller names a shorter one, which is honored as
given with no lower bound.
The lookforward also limits the live tag value the pipeline offers as a post bound: a range that ended further back than it gets none.
MAX_LOOKBACK is a guard, not a tuning knob. The lookup is a nearest-first scan of one
row, so a boundary with any sample inside the horizon costs one index seek however wide the
horizon; only a boundary with no sample reads to the far edge, and partitions past the engine's
retention are not there to read. The cap is wide enough that a tag logging a few times a year
still resolves its anchor.
Stateless and immutable, so pick(Duration) is safe to call from any thread.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DurationThe horizon used when the caller names none: the fullMAX_LOOKBACK.static final DurationThe widest search horizon a bounding-value read may use. -
Method Summary
Modifier and TypeMethodDescriptionstatic DurationPicks the search horizon: the caller's override if it is a positive duration, otherwiseDEFAULT_LOOKBACK, capped atMAX_LOOKBACKeither way.
-
Field Details
-
MAX_LOOKBACK
The widest search horizon a bounding-value read may use. -
DEFAULT_LOOKBACK
The horizon used when the caller names none: the fullMAX_LOOKBACK.
-
-
Method Details
-
pick
Picks the search horizon: the caller's override if it is a positive duration, otherwiseDEFAULT_LOOKBACK, capped atMAX_LOOKBACKeither way.- Parameters:
callerOverride- the caller's horizon;null, zero and negative mean no preference- Returns:
- the horizon, never longer than
MAX_LOOKBACK
-