class write_command_state
Declaration
class write_command_state { /* full declaration omitted */ };
Description
write_command_state is a command_id with two bits of additional information: - Whether the data written by this command is globally still the newest version ("fresh" or "stale") - Whether this data has been replicated from somewhere else, i.e., we are not the original producer
Member Variables
- command_id m_cid = 0
- static const int64_t stale_bit = 1LL << 63
- static const int64_t replicated_bit = 1LL << 62
Member Function Overview
- is_fresh() const → bool
- is_replicated() const → bool
- mark_as_stale() → void
- operator command_id() const
- write_command_state()
- write_command_state(command_id cid) → constexpr
- write_command_state(command_id cid, bool is_replicated) → constexpr
Friend Function Overview
- operator!=(const write_command_state & lhs, const write_command_state & rhs) → friend bool
- operator==(const write_command_state & lhs, const write_command_state & rhs) → friend bool
Member Functions
¶bool is_fresh() const
bool is_fresh() const
¶bool is_replicated() const
bool is_replicated() const
¶void mark_as_stale()
void mark_as_stale()
¶operator command_id() const
operator command_id() const
¶write_command_state()
write_command_state()
¶constexpr write_command_state(command_id cid)
constexpr write_command_state(command_id cid)
Parameters
- command_id cid
¶constexpr write_command_state(command_id cid,
bool is_replicated)
constexpr write_command_state(command_id cid,
bool is_replicated)
Parameters
- command_id cid
- bool is_replicated
Friend Functions
¶friend bool operator!=(
const write_command_state& lhs,
const write_command_state& rhs)
friend bool operator!=(
const write_command_state& lhs,
const write_command_state& rhs)
Parameters
- const write_command_state& lhs
- const write_command_state& rhs
¶friend bool operator==(
const write_command_state& lhs,
const write_command_state& rhs)
friend bool operator==(
const write_command_state& lhs,
const write_command_state& rhs)
Parameters
- const write_command_state& lhs
- const write_command_state& rhs