summaryrefslogtreecommitdiff
path: root/src/mongo/executor/remote_command_request.cpp
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2016-05-03 12:03:06 -0400
committerBenety Goh <benety@mongodb.com>2016-05-16 13:51:28 -0400
commit643439ff4fc91c49ffc2b103ba3858de1a165024 (patch)
tree6cc69534128bf845c5d58e200016c96ac758d3f0 /src/mongo/executor/remote_command_request.cpp
parent6a0904bd38a2deb2de127865943d57ca7cfa6927 (diff)
downloadmongo-643439ff4fc91c49ffc2b103ba3858de1a165024.tar.gz
SERVER-23134 added retry support for scheduling remote commands on a task executor
Diffstat (limited to 'src/mongo/executor/remote_command_request.cpp')
-rw-r--r--src/mongo/executor/remote_command_request.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mongo/executor/remote_command_request.cpp b/src/mongo/executor/remote_command_request.cpp
index d1c10cdd1f9..1f6486afd70 100644
--- a/src/mongo/executor/remote_command_request.cpp
+++ b/src/mongo/executor/remote_command_request.cpp
@@ -30,6 +30,8 @@
#include "mongo/executor/remote_command_request.h"
+#include <ostream>
+
#include "mongo/platform/atomic_word.h"
#include "mongo/util/mongoutils/str.h"
@@ -85,5 +87,22 @@ std::string RemoteCommandRequest::toString() const {
return out;
}
+bool RemoteCommandRequest::operator==(const RemoteCommandRequest& rhs) const {
+ if (this == &rhs) {
+ return true;
+ }
+ return target == rhs.target && dbname == rhs.dbname && cmdObj == rhs.cmdObj &&
+ metadata == rhs.metadata && timeout == rhs.timeout;
+}
+
+bool RemoteCommandRequest::operator!=(const RemoteCommandRequest& rhs) const {
+ return !(*this == rhs);
+}
+
} // namespace executor
+
+std::ostream& operator<<(std::ostream& os, const executor::RemoteCommandRequest& request) {
+ return os << request.toString();
+}
+
} // namespace mongo