/**
* Define write concern for all requests to current collection
*
* @param string|integer $w write concern
* @param int $timeout timeout in milliseconds
* @throws \Sokil\Mongo\Exception
* @return \Sokil\Mongo\Collection
*/
public function setWriteConcern($w, $timeout = 10000)
{
if (!$this->_mongoCollection->setWriteConcern($w, (int) $timeout)) {
throw new Exception('Error setting write concern');
}
return $this;
}