diff options
Diffstat (limited to 'src/mongo/s/write_ops')
-rw-r--r-- | src/mongo/s/write_ops/batched_command_request.h | 11 | ||||
-rw-r--r-- | src/mongo/s/write_ops/batched_delete_request.h | 4 | ||||
-rw-r--r-- | src/mongo/s/write_ops/batched_update_request.h | 4 |
3 files changed, 19 insertions, 0 deletions
diff --git a/src/mongo/s/write_ops/batched_command_request.h b/src/mongo/s/write_ops/batched_command_request.h index 65de53dc28d..2dd6314f6b7 100644 --- a/src/mongo/s/write_ops/batched_command_request.h +++ b/src/mongo/s/write_ops/batched_command_request.h @@ -45,12 +45,23 @@ namespace mongo { BatchedCommandRequest( BatchType batchType ); + /** + * insertReq ownership is transferred to here. + */ BatchedCommandRequest( BatchedInsertRequest* insertReq ) : _batchType( BatchType_Insert ), _insertReq( insertReq ) { } + + /** + * updateReq ownership is transferred to here. + */ BatchedCommandRequest( BatchedUpdateRequest* updateReq ) : _batchType( BatchType_Update ), _updateReq( updateReq ) { } + + /** + * deleteReq ownership is transferred to here. + */ BatchedCommandRequest( BatchedDeleteRequest* deleteReq ) : _batchType( BatchType_Delete ), _deleteReq( deleteReq ) { } diff --git a/src/mongo/s/write_ops/batched_delete_request.h b/src/mongo/s/write_ops/batched_delete_request.h index c06a78ea63b..5d673958c5f 100644 --- a/src/mongo/s/write_ops/batched_delete_request.h +++ b/src/mongo/s/write_ops/batched_delete_request.h @@ -82,6 +82,10 @@ namespace mongo { const std::string& getCollName() const; void setDeletes(const std::vector<BatchedDeleteDocument*>& deletes); + + /** + * deletes ownership is transferred to here. + */ void addToDeletes(BatchedDeleteDocument* deletes); void unsetDeletes(); bool isDeletesSet() const; diff --git a/src/mongo/s/write_ops/batched_update_request.h b/src/mongo/s/write_ops/batched_update_request.h index 2f7cfa3831b..dfdaccd5be3 100644 --- a/src/mongo/s/write_ops/batched_update_request.h +++ b/src/mongo/s/write_ops/batched_update_request.h @@ -82,6 +82,10 @@ namespace mongo { const std::string& getCollName() const; void setUpdates(const std::vector<BatchedUpdateDocument*>& updates); + + /** + * updates ownership is transferred to here. + */ void addToUpdates(BatchedUpdateDocument* updates); void unsetUpdates(); bool isUpdatesSet() const; |