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

Method data

src/zookeeper/group.cpp:241–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239
240
241Future<Option<string>> GroupProcess::data(const Group::Membership& membership)
242{
243 if (error.isSome()) {
244 return Failure(error.get());
245 } else if (state != READY) {
246 Data* data = new Data(membership);
247 pending.datas.push(data);
248 return data->promise.future();
249 }
250
251 // TODO(benh): Only attempt if the pending queue is empty so that a
252 // client can assume a happens-before ordering of operations (i.e.,
253 // the first request will happen before the second, etc).
254
255 Result<Option<string>> result = doData(membership);
256
257 if (result.isNone()) { // Try again later.
258 Data* data = new Data(membership);
259 pending.datas.push(data);
260 return data->promise.future();
261 } else if (result.isError()) {
262 return Failure(result.error());
263 }
264
265 return result.get();
266}
267
268
269Future<set<Group::Membership>> GroupProcess::watch(

Callers 15

TEST_FFunction · 0.80
fromBytesMethod · 0.80
diffFunction · 0.80
patchFunction · 0.80
deserializeFunction · 0.80
operator()Method · 0.80
decompressMethod · 0.80
compressFunction · 0.80
macFunction · 0.80
fromLinkDeviceMethod · 0.80
nodenameFunction · 0.80
pidsFunction · 0.80

Calls 9

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

Tested by 15

TEST_FFunction · 0.64
TYPED_TESTFunction · 0.64
TESTFunction · 0.64
TESTFunction · 0.64
TEST_FFunction · 0.64
TEST_PFunction · 0.64
foreachFunction · 0.64
TEST_PFunction · 0.64
getProcessIODataFunction · 0.64
TEST_FFunction · 0.64
TEST_FFunction · 0.64
TEST_FFunction · 0.64