Apache Mesos
isolator_tracker.hpp
Go to the documentation of this file.
1 // Licensed to the Apache Software Foundation (ASF) under one
2 // or more contributor license agreements. See the NOTICE file
3 // distributed with this work for additional information
4 // regarding copyright ownership. The ASF licenses this file
5 // to you under the Apache License, Version 2.0 (the
6 // "License"); you may not use this file except in compliance
7 // with the License. You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 
17 #ifndef __ISOLATOR_TRACKER_HPP__
18 #define __ISOLATOR_TRACKER_HPP__
19 
20 #include <mesos/slave/isolator.hpp>
21 
22 #include <process/owned.hpp>
23 #include <process/process.hpp>
24 
25 namespace mesos {
26 namespace internal {
27 namespace slave {
28 
30 {
31 public:
34  const std::string& _isolatorName,
35  PendingFutureTracker* _tracker);
36 
37  bool supportsNesting() override;
38  bool supportsStandalone() override;
39 
41  const std::vector<mesos::slave::ContainerState>& states,
42  const hashset<ContainerID>& orphans) override;
43 
45  const ContainerID& containerId,
46  const mesos::slave::ContainerConfig& containerConfig) override;
47 
49  const ContainerID& containerId,
50  pid_t pid) override;
51 
53  const ContainerID& containerId) override;
54 
56  const ContainerID& containerId,
57  const Resources& resources) override;
58 
60  const ContainerID& containerId) override;
61 
63  const ContainerID& containerId) override;
64 
66  const ContainerID& containerId) override;
67 
68 private:
70  std::string isolatorName;
71  PendingFutureTracker* tracker;
72 };
73 
74 } // namespace slave {
75 } // namespace internal {
76 } // namespace mesos {
77 
78 
79 #endif // __ISOLATOR_TRACKER_HPP__
process::Future< Nothing > cleanup(const ContainerID &containerId) override
Definition: resources.hpp:83
process::Future< Nothing > isolate(const ContainerID &containerId, pid_t pid) override
process::Future< Nothing > recover(const std::vector< mesos::slave::ContainerState > &states, const hashset< ContainerID > &orphans) override
DWORD pid_t
Definition: windows.hpp:181
Definition: future_tracker.hpp:84
process::Future< ResourceStatistics > usage(const ContainerID &containerId) override
IsolatorTracker(const process::Owned< mesos::slave::Isolator > &_isolator, const std::string &_isolatorName, PendingFutureTracker *_tracker)
Definition: agent.hpp:25
Definition: isolator_tracker.hpp:29
Definition: attributes.hpp:24
process::Future< Option< mesos::slave::ContainerLaunchInfo > > prepare(const ContainerID &containerId, const mesos::slave::ContainerConfig &containerConfig) override
process::Future< ContainerStatus > status(const ContainerID &containerId) override
process::Future< Nothing > update(const ContainerID &containerId, const Resources &resources) override
process::Future< mesos::slave::ContainerLimitation > watch(const ContainerID &containerId) override
Definition: isolator.hpp:39