17 #ifndef __MESOS_LOG_LOG_HPP__ 18 #define __MESOS_LOG_LOG_HPP__ 64 return value == that.value;
69 return value < that.value;
74 return value <= that.value;
79 return value > that.value;
84 return value >= that.value;
91 CHECK(
sizeof(value) == 8);
93 bytes[0] =(0xff & (value >> 56));
94 bytes[1] = (0xff & (value >> 48));
95 bytes[2] = (0xff & (value >> 40));
96 bytes[3] = (0xff & (value >> 32));
97 bytes[4] = (0xff & (value >> 24));
98 bytes[5] = (0xff & (value >> 16));
99 bytes[6] = (0xff & (value >> 8));
100 bytes[7] = (0xff & value);
101 return std::string(bytes,
sizeof(bytes));
110 Position(uint64_t _value) : value(_value) {}
125 : position(_position), data(_data) {}
197 const std::string&
path,
198 const std::set<process::UPID>&
pids,
199 bool autoInitialize =
false,
207 const std::string& path,
208 const std::string& servers,
210 const std::string& znode,
212 bool autoInitialize =
false,
221 CHECK(identity.size() == 8);
222 const char* bytes = identity.c_str();
224 ((uint64_t) (bytes[0] & 0xff) << 56) |
225 ((uint64_t) (bytes[1] & 0xff) << 48) |
226 ((uint64_t) (bytes[2] & 0xff) << 40) |
227 ((uint64_t) (bytes[3] & 0xff) << 32) |
228 ((uint64_t) (bytes[4] & 0xff) << 24) |
229 ((uint64_t) (bytes[5] & 0xff) << 16) |
230 ((uint64_t) (bytes[6] & 0xff) << 8) |
231 ((uint64_t) (bytes[7] & 0xff));
245 #endif // __MESOS_LOG_LOG_HPP__
std::string data
Definition: log.hpp:119
bool operator<=(const Position &that) const
Definition: log.hpp:72
bool operator==(const Position &that) const
Definition: log.hpp:62
bool operator>(const Position &that) const
Definition: log.hpp:77
bool operator>=(const Position &that) const
Definition: log.hpp:82
std::string identity() const
Definition: log.hpp:89
Definition: duration.hpp:32
Try< Nothing > start(const std::string &name)
Starts the slice with the given name (via 'systemctl start <name>').
Position position(const std::string &identity) const
Definition: log.hpp:219
Try< Nothing > append(const std::string &path, const google::protobuf::Message &message, bool sync=false)
Definition: protobuf.hpp:174
Position position
Definition: log.hpp:118
Result< Process > process(pid_t pid)
Definition: freebsd.hpp:30
Definition: attributes.hpp:24
Result< Credentials > read(const Path &path)
Definition: credentials.hpp:35
process::Future< Nothing > catchup(size_t quorum, const process::Shared< Replica > &replica, const process::Shared< Network > &network, const Option< uint64_t > &proposal, const IntervalSet< uint64_t > &positions, const Duration &timeout=Seconds(10))
bool operator<(const Position &that) const
Definition: log.hpp:67
Try< std::set< pid_t > > pids()
Definition: freebsd.hpp:62
Definition: future.hpp:58