(PECL mongo >= 1.5.0)
log_write_batch — Fonction de rappel pour écrire les lots
$server
, array $writeOptions
, array $batch
, array $protocolOptions
)Une fonction de rappel callable, utilisée par l'option de contexte log_write_batch, lors de l'exécution d'un lot d'opérations.
Note:
Ceci n'est pas une fonction réelle, mais seulement un prototype de la façon dont la fonction doit être.
serverUn tableau contenant les informations basiques du serveur récupéré.
| clé | valeur |
|---|---|
| hash | Hash du serveur, par exemple : localhost:27017;-;X;56052 |
| type | Type du noeud (primaire/secondaire/mongos/arbitraire) : 2 |
| max_bson_size | La taille BSON maximale que ce noeud accepte : 16777216 |
| max_message_size | La taille maximale du message que ce noeud accepte : 48000000 |
| request_id | L'identifiant de requête pour ce message : 42 |
writeOptions
| key | value |
|---|---|
| ordered | boolean, if the operation (in case of batch operation) must be executed sequentually (ordered=true) |
| writeConcern | An array of writeConcern options (see below) |
| key | value |
|---|---|
| fsync | boolean, force flushing to disk before returning |
| j | boolean, force journal write before returning |
| wtimeout | integer, milliseconds, maximum time the primary is allowed to wait to verify replication |
| w | integer=server count, or string=replication-tag |
batch
Tableau, le lot actuel d'opérations.
protocolOptions
| key | value |
|---|---|
| message_length | The total size (in bytes) of the encoded message being sent over the wire |
| request_id | The request identifier for this message: 42 |
| namespace | The MongoDB namespace used for the protocol message dbname.collectionname |
| Version | Description |
|---|---|
| 1.5.0 | Uniquement disponible lors d'une connexion à MongoDB 2.6.0+ |