#include "tensorstore/kvstore/operations.h"
struct tensorstore::kvstore::ReadGenerationConditions;

Specifies constraints on the generation for read operations.

Data members

StorageGeneration if_not_equal;

The read is aborted if the generation associated with the stored key matches if_not_equal. The special values of StorageGeneration::Unknown() (the default) or StorageGeneration::NoValue() disable this condition.

StorageGeneration if_equal;

The read is aborted if the generation associated with the stored key does not match if_equal. This is primarily useful in conjunction with a ReadOptions::byte_range request to ensure consistency.

Methods

bool Matches(const StorageGenerationgeneration) const;

Returns true if generation satisfies the constraints.

Conversion operators

explicit operator bool() const;

Indicates if any constraints are specified.