MariaDBServer no longer uses ClusterOperation

The functions in the server class now only use the general parameters object.
This commit is contained in:
Esa Korhonen
2018-10-19 12:58:18 +03:00
parent 8877e7180b
commit a4ce4e4613
6 changed files with 130 additions and 110 deletions

View File

@ -232,33 +232,6 @@ public:
json_t** error, maxbase::Duration time_remaining);
};
/**
* Class which encapsulates many settings and status descriptors for a failover/switchover.
* Is more convenient to pass around than the separate elements. Most fields are constants or constant
* pointers since they should not change during an operation.
*/
class ClusterOperation
{
private:
ClusterOperation(const ClusterOperation&) = delete;
ClusterOperation& operator=(const ClusterOperation&) = delete;
public:
const OperationType type; // Failover or switchover
ServerOperation* const demotion; // Required by MariaDBServer->demote()
ServerOperation* const promotion; // Required by MariaDBServer->promote()
GeneralOpData general; // General operation data
MariaDBServer* const promotion_target; // Which server will be promoted
MariaDBServer* const demotion_target; // Which server will be demoted
ClusterOperation(OperationType type, ServerOperation* dem_op, ServerOperation* prom_op,
MariaDBServer* promotion_target, MariaDBServer* demotion_target,
std::string& replication_user, std::string& replication_password,
json_t** error, maxbase::Duration time_remaining);
~ClusterOperation();
};
// Operation data which concerns a single server
class ServerOperation
{