Status ReplicationCoordinatorExternalStateMock::storeLocalConfigDocument(OperationContext* opCtx, const BSONObj& config) { if (_storeLocalConfigDocumentStatus.isOK()) { setLocalConfigDocument(StatusWith<BSONObj>(config)); return Status::OK(); } return _storeLocalConfigDocumentStatus; }
Status ReplicationCoordinatorExternalStateMock::storeLocalConfigDocument(OperationContext* txn, const BSONObj& config) { { stdx::unique_lock<stdx::mutex> lock(_shouldHangConfigMutex); while (_storeLocalConfigDocumentShouldHang) { _shouldHangConfigCondVar.wait(lock); } } if (_storeLocalConfigDocumentStatus.isOK()) { setLocalConfigDocument(StatusWith<BSONObj>(config)); return Status::OK(); } return _storeLocalConfigDocumentStatus; }
Status ReplicationCoordinatorExternalStateMock::storeLocalConfigDocument( OperationContext* txn, const BSONObj& config) { setLocalConfigDocument(StatusWith<BSONObj>(config)); return Status::OK(); }