-
#include "tensorstore/staleness_bound.h" - class tensorstore::StalenessBound;
Specifies a resolved time bound on cached data or metadata.
Constructors¶
- StalenessBound();
The default StalenessBound of
absl::InfiniteFuture()ensures data is never stale.
- StalenessBound(RecheckCacheOption option);
Constructs from a
RecheckCacheOption.
- StalenessBound(absl::Time newer_than_time);
Constructs from the specified
newer_than_timebound.
- StalenessBound(absl::Duration duration_before_now);
Constructs a bound of
absl::Now() - duration_before_now.
Friend functions¶
-
friend std::ostream&
operator<<(std::ostream& os, const StalenessBound& bound); - friend void AbslStringify(Sink& sink, const StalenessBound& bound);
Overload for the benefit of GoogleTest.
-
friend bool
operator==(const StalenessBound& a, const StalenessBound& b); Compares two
StalenessBoundvalues for equality.
Methods¶
- StalenessBound BoundAtOpen(absl::Time open_time) const;
Returns the effective bound given the specified open time.
- static StalenessBound BoundedByOpen();
Returns a new staleness bound with
bounded_by_open_time == true.
Data members¶
- absl::Time time = absl::InfiniteFuture();
Time bound.
- bool bounded_by_open_time;
Specifies whether this
StalenessBoundwas initialized with an “open time”. When serializing back to JSON, such a bound is recorded specially rather than as a timestamp.
Related Types¶
- struct tensorstore::StalenessBounds;
Combines staleness bounds for metadata and data.