17 #ifndef __MESOS_STATE_STATE_HPP__ 18 #define __MESOS_STATE_STATE_HPP__ 75 variable.entry.set_value(value);
82 explicit Variable(
const internal::state::Entry& _entry)
86 internal::state::Entry entry;
116 const std::string& name,
120 const internal::state::Entry& entry,
129 return storage->get(name)
135 const std::string&
name,
144 internal::state::Entry entry;
145 entry.set_name(name);
159 internal::state::Entry entry;
160 entry.set_name(variable.entry.name());
162 entry.set_value(variable.entry.value());
164 return storage->set(entry, uuid)
170 const internal::state::Entry& entry,
183 return storage->expunge(variable.entry);
189 return storage->names();
195 #endif // __MESOS_STATE_STATE_HPP__ State(Storage *_storage)
Definition: state.hpp:93
process::Future< bool > expunge(const Variable &variable)
Definition: state.hpp:181
process::Future< Option< Variable > > store(const Variable &variable)
Definition: state.hpp:152
Definition: option.hpp:29
std::string value() const
Definition: state.hpp:67
process::Future< std::set< std::string > > names()
Definition: state.hpp:187
Try< T > fetch(const std::string &value)
Definition: fetch.hpp:38
virtual ~State()
Definition: state.hpp:94
bool isSome() const
Definition: option.hpp:116
static UUID random()
Definition: uuid.hpp:38
Variable mutate(const std::string &value) const
Definition: state.hpp:72
const T & get() const &
Definition: option.hpp:119
Definition: storage.hpp:33
process::Future< Variable > fetch(const std::string &name)
Definition: state.hpp:127
_Some< typename std::decay< T >::type > Some(T &&t)
Definition: some.hpp:42
static Try< UUID > fromBytes(const std::string &s)
Definition: uuid.hpp:49
Try< Nothing > bind(int_fd s, const Address &address)
Definition: network.hpp:46
constexpr const char * name
Definition: shell.hpp:41
Definition: future.hpp:58