| 58 | ~V0ToV1AdapterProcess() override = default; |
| 59 | |
| 60 | void registered( |
| 61 | const mesos::ExecutorInfo& _executorInfo, |
| 62 | const mesos::FrameworkInfo& _frameworkInfo, |
| 63 | const mesos::SlaveInfo& slaveInfo) |
| 64 | { |
| 65 | if (!connected) { |
| 66 | callbacks.connected(); |
| 67 | connected = true; |
| 68 | } |
| 69 | |
| 70 | // We need these copies to populate the fields in `Event::Subscribed` upon |
| 71 | // receiving a `reregistered()` callback later. |
| 72 | executorInfo = _executorInfo; |
| 73 | frameworkInfo = _frameworkInfo; |
| 74 | |
| 75 | Event event; |
| 76 | event.set_type(Event::SUBSCRIBED); |
| 77 | |
| 78 | Event::Subscribed* subscribed = event.mutable_subscribed(); |
| 79 | |
| 80 | subscribed->mutable_executor_info()->CopyFrom(evolve(executorInfo.get())); |
| 81 | subscribed->mutable_framework_info()->CopyFrom(evolve(frameworkInfo.get())); |
| 82 | subscribed->mutable_agent_info()->CopyFrom(evolve(slaveInfo)); |
| 83 | |
| 84 | received(event); |
| 85 | } |
| 86 | |
| 87 | void reregistered( |
| 88 | const mesos::SlaveInfo& slaveInfo) |