log_cmd_insert

(PECL mongo >= 1.5.0)

log_cmd_insertCallback When Inserting Documents

説明

log_cmd_insert ( array $server , array $document , array $writeOptions , array $protocolOptions )

A callable function, used by the log_cmd_insert context option, when inserting a document

注意:

This is not a real function, only a prototype of how the function should be.

パラメータ

server

選んだサーバーについての基本情報を含む配列。

キー
hashハーバーハッシュ。例:localhost:27017;-;X;56052
typeノード型 (primary/secondary/mongos/arbiter)。例:2
max_bson_sizeこのノードがネットワーク越しに受け付ける BSON の最大サイズ。例:16777216
max_message_sizeこのノードがネットワーク越しに受け入れるメッセージの最大サイズ。例:48000000
request_idこのメッセージのリクエスト識別子。例:42

document

The document that has been prepared to be inserted

writeOptions

キー
orderedboolean で、バッチ操作をシーケンシャルに行う必要がある (orderd = true) かどうかを表します。
writeConcern書き込み確認のオプションの配列 (以下を参照ください)
書き込み確認の配列の値
キー
fsyncboolean で、強制的にディスクへのフラッシュをしてから返します。
jboolean で、強制的にジャーナルに書き出してから返します。
wtimeoutinteger で、プライマリがレプリケーションの検証までに待つ最大の時間をミリ秒で指定します。
winteger でサーバー数、あるいは文字列でレプリケーションタグを指定します。

protocolOptions

キー
message_lengthネットワーク越しに送信するエンコード済みメッセージのサイズ (バイト数)。
request_idこのメッセージのリクエスト識別子。例:42
namespaceプロトコルメッセージに使う、MongoDB 名前空間。例:dbname.collectionname

変更履歴

バージョン 説明
1.5.0 Only available when connected to MongoDB 2.6.0+