(PECL mongo >=1.5.0)
MongoClient::setWriteConcern — Set the write concern for this connection
A extensão que define esse método está obsoleta. Alternativamente a extensão MongoDB deve ser utilizada. Não há um equivalente deste método na nova extensão.
wThe write concern. This may be an integer denoting the number of servers required to acknowledge the write, or a string mode (e.g. "majority").
wtimeoutThe maximum number of milliseconds to wait for the server to satisfy the write concern.
Returns TRUE on success, or FALSE otherwise.
Emits E_WARNING if the w parameter is not an integer or string value.
Exemplo #1 MongoClient::setWriteConcern() example
<?php
$mc = new MongoClient('mongodb://rs1.example.com,rs2.example.com');
// Require that the majority of servers in the replica set acknowledge writes
// within three seconds.
$mc->setWriteConcern('majority', 3000);
?>