27#ifndef _UTILS_NETWORKSTATE_HXX_
28#define _UTILS_NETWORKSTATE_HXX_
A BarrierNotifiable allows to create a number of child Notifiable and wait for all of them to finish.
"Abstract" interface for a binary network state.
virtual ~NetworkState()
Destructor.
virtual bool is_state_known()=0
Get an indication as to if the state is known.
virtual State get_state()=0
Get the current state.
virtual void toggle(Notifiable *done)=0
Toggle the state.
@ INVALID
state is "invalid"
@ UNKNOWN
state is "unknown"
virtual void initiate_query(BarrierNotifiable *done)=0
Queries and acquires the current state of the bit.
virtual void reset()=0
Reset the network state to unknown.
virtual void set_state(bool state, Notifiable *done)=0
Set the state.
virtual void set_callback(std::function< void()> cb)=0
Set the change notification callback.
An object that can schedule itself on an executor to run.