| 43 | namespace log { |
| 44 | |
| 45 | static bool isRejectedPromise(const PromiseResponse& response) |
| 46 | { |
| 47 | if (response.has_type()) { |
| 48 | // New format (Mesos >= 0.26). |
| 49 | return response.type() == PromiseResponse::REJECT; |
| 50 | } else { |
| 51 | // Old format (Mesos < 0.26). |
| 52 | return !response.okay(); |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | |
| 57 | static bool isRejectedWrite(const WriteResponse& response) |