Sokil\Mongo\Database::setUnacknowledgedWriteConcern PHP Method

setUnacknowledgedWriteConcern() public method

May be used only if mongo extension version >=1.5
public setUnacknowledgedWriteConcern ( integer $timeout = 10000 ) : Database
$timeout integer timeout in milliseconds
return Database
    public function setUnacknowledgedWriteConcern($timeout = 10000)
    {
        $this->setWriteConcern(0, (int) $timeout);
        return $this;
    }

Usage Example

コード例 #1
0
ファイル: DatabaseTest.php プロジェクト: agolomazov/php-mongo
 public function testSetUnacknowledgedWriteConcern()
 {
     $this->database->setUnacknowledgedWriteConcern(11000);
     $this->assertEquals(array('w' => 0, 'wtimeout' => 11000), $this->database->getWriteConcern());
 }