17 #ifndef __MESOS_STATE_PROTOBUF_HPP__ 18 #define __MESOS_STATE_PROTOBUF_HPP__ 61 : variable(_variable), t(_t)
106 template <
typename T>
110 .then(
lambda::bind(&State::template _fetch<T>, lambda::_1));
114 template <
typename T>
118 Try<T> t = ::protobuf::deserialize<T>(variable.
value());
127 template <
typename T>
138 .then(
lambda::bind(&State::template _store<T>, variable.t, lambda::_1));
142 template <
typename T>
155 template <
typename T>
165 #endif // __MESOS_STATE_PROTOBUF_HPP__ process::Future< bool > expunge(const Variable &variable)
Definition: state.hpp:181
process::Future< Option< Variable > > store(const Variable &variable)
Definition: state.hpp:152
State(mesos::state::Storage *storage)
Definition: protobuf.hpp:72
Definition: option.hpp:29
T & get()&
Definition: try.hpp:80
process::Future< Option< Variable< T > > > store(const Variable< T > &variable)
Definition: protobuf.hpp:128
~State() override
Definition: protobuf.hpp:74
Definition: future.hpp:668
std::string value() const
Definition: state.hpp:67
Try< T > fetch(const std::string &value)
Definition: fetch.hpp:38
Try< std::string > serialize(const T &t)
Definition: protobuf.hpp:230
bool isSome() const
Definition: option.hpp:116
Variable mutate(const T &t) const
Definition: protobuf.hpp:50
Definition: protobuf.hpp:69
Variable mutate(const std::string &value) const
Definition: state.hpp:72
process::Future< Variable< T > > fetch(const std::string &name)
Definition: protobuf.hpp:107
const T & get() const &
Definition: option.hpp:119
Definition: protobuf.hpp:61
static Try error(const E &e)
Definition: try.hpp:43
Definition: storage.hpp:33
process::Future< Variable > fetch(const std::string &name)
Definition: state.hpp:127
process::Future< bool > expunge(const Variable< T > &variable)
Definition: protobuf.hpp:156
_Some< typename std::decay< T >::type > Some(T &&t)
Definition: some.hpp:42
bool isError() const
Definition: try.hpp:78
Definition: protobuf.hpp:42
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