This article is deprecated.
Start the connection pool, and synchronously connect all worker processes.
Prototype
bool open(OpenParameters *params, int *badNode = 0);Arguments
paramsAn initialized instance of struct OpenParameters.badNodeIf this parameter is not null and the open fails, then the index of the node that is not available is stored inbadNode.Description
This method opens an eXtremeDB database, an eXtremeDB SQL mapper and the AsyncDistributedSqlEngine instance with the parameters specified in
params. It then calls the open( parameter list ) method passing the specified parameter values.Returns
This method returns
trueif the connection to the server was successfully established,falseotherwise.Example
const size_t nWorkers = 4; OpenParameters::NodeParams nodes[2]; int main(int argc, char** argv) { try { nodes[0].address = "localhost:5001"; nodes[1].address = "localhost:5002"; McoSql::AsyncDistributedSqlEngine engine(nWorkers); OpenParameters params(sizeof(nodes) / sizeof(nodes[0])); params.nodes[0] = nodes[0]; params.nodes[1] = nodes[1]; int badNode = -1; if (!engine.open(¶ms, &badNode)) { printf("Open failed: %s\n", engine.getError()->cstr()); return 1; } ... } }