Mark several more methods const
This commit is contained in:
parent
c9968f5c0c
commit
ec615181ce
|
@ -2175,7 +2175,7 @@ void DatabaseContext::removeWatch() {
|
|||
ASSERT(outstandingWatches >= 0);
|
||||
}
|
||||
|
||||
Future<Void> DatabaseContext::onConnected() {
|
||||
Future<Void> DatabaseContext::onConnected() const {
|
||||
return connected;
|
||||
}
|
||||
|
||||
|
|
|
@ -353,8 +353,9 @@ public:
|
|||
|
||||
int apiVersionAtLeast(int minVersion) const { return apiVersion.version() >= minVersion; }
|
||||
|
||||
Future<Void> onConnected(); // Returns after a majority of coordination servers are available and have reported a
|
||||
// leader. The cluster file therefore is valid, but the database might be unavailable.
|
||||
Future<Void> onConnected()
|
||||
const; // Returns after a majority of coordination servers are available and have reported a
|
||||
// leader. The cluster file therefore is valid, but the database might be unavailable.
|
||||
Reference<IClusterConnectionRecord> getConnectionRecord();
|
||||
|
||||
// Switch the database to use the new connection file, and recreate all pending watches for committed transactions.
|
||||
|
|
|
@ -515,7 +515,7 @@ public:
|
|||
|
||||
void setRequestStreamEndpoint(const Endpoint& endpoint) { queue->requestStreamEndpoint = endpoint; }
|
||||
|
||||
bool connected() { return queue->acknowledgements.getRawEndpoint().isValid() || queue->error.isValid(); }
|
||||
bool connected() const { return queue->acknowledgements.getRawEndpoint().isValid() || queue->error.isValid(); }
|
||||
|
||||
Future<Void> onConnected() {
|
||||
if (connected()) {
|
||||
|
|
|
@ -531,7 +531,7 @@ struct LeaderRegisterCollection {
|
|||
return Void();
|
||||
}
|
||||
|
||||
Future<Void> onError() { return actors.getResult(); }
|
||||
Future<Void> onError() const { return actors.getResult(); }
|
||||
|
||||
// Check if the this coordinator is no longer the leader, and the new one was stored in the "forward" keyspace.
|
||||
// If the "forward" keyspace was set some time ago (as configured by knob), log an error to indicate the client is
|
||||
|
|
|
@ -341,7 +341,7 @@ public:
|
|||
BindPromise(BindPromise const& r) : p(r.p), errContext(r.errContext), errID(r.errID) {}
|
||||
BindPromise(BindPromise&& r) noexcept : p(std::move(r.p)), errContext(r.errContext), errID(r.errID) {}
|
||||
|
||||
Future<Void> getFuture() { return p.getFuture(); }
|
||||
Future<Void> getFuture() const { return p.getFuture(); }
|
||||
|
||||
void operator()(const boost::system::error_code& error, size_t bytesWritten = 0) {
|
||||
try {
|
||||
|
|
|
@ -1832,7 +1832,7 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool isError() {
|
||||
bool isError() const {
|
||||
for (int i = 0; i < futures.size(); i++)
|
||||
if (futures[i].isError())
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue