-
#include "tensorstore/kvstore/generation.h"
- struct tensorstore::TimestampedStorageGeneration;
Combines a local timestamp with a StorageGeneration indicating the local time for which the generation is known to be current.
Constructors¶
- TimestampedStorageGeneration();
Constructs with an unspecified generation and infinite past timestamp.
-
TimestampedStorageGeneration(StorageGeneration generation,
absl::Time time); Constructs from the specified generation and time.
Data members¶
- StorageGeneration generation;
Storage generation.
- absl::Time time = absl::InfinitePast();
Timestamp associated with
generation
.
Methods¶
- bool unconditional() const;
Checks if
time
is equal to the infinite future value.
- static TimestampedStorageGeneration Unconditional();
Returns a timestamped generation with unspecified generation and infinite future timestamp.
Friend functions¶
-
friend bool operator==(const TimestampedStorageGeneration& a,
const TimestampedStorageGeneration& b); -
friend bool operator!=(const TimestampedStorageGeneration& a,
const TimestampedStorageGeneration& b); Compares two timestamped generations for equality.
-
friend std::ostream&
operator<<(std::ostream& os, const TimestampedStorageGeneration& x); Prints a debugging string representation to an
std::ostream
.