PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

MongoClient::getWriteConcern - Get the write concern for this connection | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

MongoClient::getWriteConcern

(PECL mongo >=1.5.0)

MongoClient::getWriteConcernGet the write concern for this connection

このメソッドを定義している拡張モジュールは非推奨です。 かわりに MongoDB 拡張モジュールを使うべきです。 このメソッドの代替は、新しい拡張モジュールには存在しません。

説明

public array MongoClient::getWriteConcern ( void )

パラメータ

この関数にはパラメータはありません。

返り値

この関数は、書き込み確認を表す配列を返します。w の値はサーバーの台数を表す整数値かモードを表す文字列、そして wtimeout の値はサーバーが書き込み確認を待つ最大ミリ秒数です。

例1 MongoClient::getWriteConcern() return value example

<?php

$mc 
= new MongoClient('mongodb://localhost:27017', array('wTimeoutMS' => 500));
var_dump($mc->getWriteConcern());

$mc->setWriteConcern(11000);
var_dump($mc->getWriteConcern());
?>

上の例の出力は以下となります。

array(2) {
  ["w"]=>
  int(1)
  ["wtimeout"]=>
  int(500)
}
array(2) {
  ["w"]=>
  int(1)
  ["wtimeout"]=>
  int(1000)
}

参考


忘却曲線を使ってこの知識を確実に記憶に残す

フォーラムで「MongoClient::getWriteConcern - Get the write concern for this connection」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | MongoClient::getWriteConcern - Get the write concern for this connection」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: