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

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

  

MongoCollection::getWriteConcern

(PECL mongo >=1.5.0)

MongoCollection::getWriteConcernGet the write concern for this collection

説明

public array MongoCollection::getWriteConcern ( void )

パラメータ

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

返り値

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

例1 MongoCollection::getWriteConcern() return value example

<?php

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

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

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

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

参考


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

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