MongoDB\Driver\WriteConcern::getWtimeout

(mongodb >=1.0.0)

MongoDB\Driver\WriteConcern::getWtimeoutReturns the WriteConcern's "wtimeout" option

说明

final public MongoDB\Driver\WriteConcern::getWtimeout ( void ) : int

参数

此函数没有参数。

返回值

Returns the WriteConcern's "wtimeout" option.

错误/异常

范例

Example #1 MongoDB\Driver\WriteConcern::getWtimeout() example

<?php

$wc 
= new MongoDB\Driver\WriteConcern(1);
var_dump($wc->getWtimeout());

$wc = new MongoDB\Driver\WriteConcern(MongoDB\Driver\WriteConcern::MAJORITY3000);
var_dump($wc->getWtimeout());

?>

以上例程会输出:

int(0)
int(3000)
相关文章
php mongodb driver monitoring commandfailedevent returns the command s request idphp mongodb driver monitoring commandfailedevent returns the server on which the command was executedphp mongodb driver monitoring commandstartedevent returns the command documentphp mongodb driver monitoring commandstartedevent returns the command namephp mongodb driver monitoring commandsucceededevent returns the server on which the command was executedphp mongodb driver readconcern returns an object for bson serializationphp mongodb driver readconcern returns the readconcern s level optionphp mongodb driver readpreference returns the readpreference s maxstalenessseconds optionphp mongodb driver readpreference returns the readpreference s mode optionphp mongodb driver readpreference returns the readpreference s tagsets optionphp mongodb driver server returns the hostname of this serverphp mongodb driver writeconcern returns an object for bson serializationphp mongodb driver writeconcern returns the writeconcern s journal optionphp mongodb driver writeconcern returns the writeconcern s w optionphp mongodb driver writeconcern returns the writeconcern s wtimeout optionphp mongodb driver writeconcern checks if this is the default write concernphp mongodb driver writeresult returns the server associated with this write resultphp mongodb driver writeresult returns the number of documents inserted by an upsertphp mongodb driver writeresult returns an array of identifiers for upserted documentsphp mongodb driver writeresult returns any write concern error that occurred
关注编程学问公众号