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

Method watchResources

src/resource_provider/storage/provider.cpp:763–785  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

761
762
763void StorageLocalResourceProviderProcess::watchResources()
764{
765 // A specified reconciliation interval of zero
766 // denotes disabled periodic reconciliations.
767 if (reconciliationInterval == Seconds(0)) {
768 return;
769 }
770
771 CHECK(info.has_id());
772
773 loop(
774 self(),
775 std::bind(&process::after, reconciliationInterval),
776 [this](const Nothing&) {
777 // Poll resource provider state in `sequence` to
778 // prevent concurrent non-reconcilable operations.
779 reconciled = sequence.add(std::function<Future<Nothing>()>(
780 defer(self(), &Self::reconcileResources, false)));
781
782 return reconciled.then(
783 [](const Nothing&) -> ControlFlow<Nothing> { return Continue(); });
784 });
785}
786
787
788Future<Nothing> StorageLocalResourceProviderProcess::reconcileResources(

Callers

nothing calls this directly

Calls 7

SecondsClass · 0.85
loopFunction · 0.85
deferFunction · 0.85
bindFunction · 0.50
ContinueClass · 0.50
addMethod · 0.45
thenMethod · 0.45

Tested by

no test coverage detected