summaryrefslogtreecommitdiff
path: root/src/mongo/db/keys_collection_manager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/keys_collection_manager.h')
-rw-r--r--src/mongo/db/keys_collection_manager.h29
1 files changed, 8 insertions, 21 deletions
diff --git a/src/mongo/db/keys_collection_manager.h b/src/mongo/db/keys_collection_manager.h
index 2bb3ca00744..73caf91fff9 100644
--- a/src/mongo/db/keys_collection_manager.h
+++ b/src/mongo/db/keys_collection_manager.h
@@ -75,20 +75,18 @@ public:
Seconds keyValidForInterval);
/**
- * Return a key that is valid for the given time and also matches the keyId. Note that this call
- * can block if it will need to do a refresh.
+ * Returns the validation keys that are valid for the given time and also match the keyId. Does
+ * a blocking refresh if there is no matching internal key. If there is a matching internal key,
+ * includes it as first key in the resulting vector.
*
- * Throws ErrorCode::ExceededTimeLimit if it times out.
+ * Throws ExceededTimeLimit if the refresh times out, and KeyNotFound if there are no such keys.
*/
- StatusWith<KeysCollectionDocument> getKeyForValidation(OperationContext* opCtx,
- long long keyId,
- const LogicalTime& forThisTime);
+ StatusWith<std::vector<KeysCollectionDocument>> getKeysForValidation(
+ OperationContext* opCtx, long long keyId, const LogicalTime& forThisTime);
/**
- * Returns a key that is valid for the given time. Note that unlike getKeyForValidation, this
- * will never do a refresh.
- *
- * Throws ErrorCode::ExceededTimeLimit if it times out.
+ * Returns the signing key that is valid for the given time. Note that unlike
+ * getKeysForValidation, this will never do a refresh.
*/
StatusWith<KeysCollectionDocument> getKeyForSigning(OperationContext* opCtx,
const LogicalTime& forThisTime);
@@ -194,17 +192,6 @@ private:
bool _inShutdown = false;
};
- /**
- * Return a key that is valid for the given time and also matches the keyId.
- */
- StatusWith<KeysCollectionDocument> _getKeyWithKeyIdCheck(long long keyId,
- const LogicalTime& forThisTime);
-
- /**
- * Return a key that is valid for the given time.
- */
- StatusWith<KeysCollectionDocument> _getKey(const LogicalTime& forThisTime);
-
std::unique_ptr<KeysCollectionClient> _client;
const std::string _purpose;
const Seconds _keyValidForInterval;