MCPcopy Create free account
hub / github.com/apache/mesos / get

Method get

src/state/zookeeper.cpp:242–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240
241
242Future<Option<Entry>> ZooKeeperStorageProcess::get(const string& name)
243{
244 if (error.isSome()) {
245 return Failure(error.get());
246 } else if (state != CONNECTED) {
247 Get* get = new Get(name);
248 pending.gets.push(get);
249 return get->promise.future();
250 }
251
252 Result<Option<Entry>> result = doGet(name);
253
254 if (result.isNone()) { // Try again later.
255 Get* get = new Get(name);
256 pending.gets.push(get);
257 return get->promise.future();
258 } else if (result.isError()) {
259 return Failure(result.error());
260 }
261
262 return result.get();
263}
264
265
266Future<bool> ZooKeeperStorageProcess::set(

Callers 7

namesMethod · 0.45
setMethod · 0.45
expungeMethod · 0.45
connectedMethod · 0.45
doGetMethod · 0.45
doSetMethod · 0.45
doExpungeMethod · 0.45

Calls 8

FailureClass · 0.85
pushMethod · 0.80
errorMethod · 0.65
dispatchFunction · 0.50
isSomeMethod · 0.45
futureMethod · 0.45
isNoneMethod · 0.45
isErrorMethod · 0.45

Tested by

no test coverage detected