summaryrefslogtreecommitdiff
path: root/src/mongo/client/remote_command_targeter.h
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2018-09-18 12:06:53 -0400
committerMathias Stearn <mathias@10gen.com>2018-09-20 19:25:20 -0400
commita276b7b1d0cc1d8d1e35bc0a222d2b2cce64bf43 (patch)
tree6ea2be37e2eaeb0e94db81b1c9f5c8438b684db6 /src/mongo/client/remote_command_targeter.h
parent2f58283213f8a80a37f78b6de2c527951306f2b5 (diff)
downloadmongo-a276b7b1d0cc1d8d1e35bc0a222d2b2cce64bf43.tar.gz
SERVER-35689 Futurize RSM API with temporary detached-thread implementation
Diffstat (limited to 'src/mongo/client/remote_command_targeter.h')
-rw-r--r--src/mongo/client/remote_command_targeter.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/client/remote_command_targeter.h b/src/mongo/client/remote_command_targeter.h
index 55e47db6f8f..1bdd2b9b053 100644
--- a/src/mongo/client/remote_command_targeter.h
+++ b/src/mongo/client/remote_command_targeter.h
@@ -29,6 +29,7 @@
#pragma once
#include "mongo/base/disallow_copying.h"
+#include "mongo/util/future.h"
#include "mongo/util/net/hostandport.h"
#include "mongo/util/time_support.h"
@@ -76,8 +77,8 @@ public:
* DEPRECATED. Prefer findHost(OperationContext*, const ReadPreferenceSetting&), whenever
* an OperationContext is available.
*/
- virtual StatusWith<HostAndPort> findHostWithMaxWait(const ReadPreferenceSetting& readPref,
- Milliseconds maxWait) = 0;
+ virtual Future<HostAndPort> findHostWithMaxWait(const ReadPreferenceSetting& readPref,
+ Milliseconds maxWait) = 0;
/**
* Finds a host matching the given read preference, giving up if a match is not found promptly.
@@ -89,7 +90,7 @@ public:
* callers have been shown to be safe with this behavior or changed to call findHost.
*/
StatusWith<HostAndPort> findHostNoWait(const ReadPreferenceSetting& readPref) {
- return findHostWithMaxWait(readPref, Milliseconds::zero());
+ return findHostWithMaxWait(readPref, Milliseconds::zero()).getNoThrow();
}
/**