summaryrefslogtreecommitdiff
path: root/src/mongo/db/keys_collection_manager.h
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2017-05-01 14:37:16 -0400
committerRandolph Tan <randolph@10gen.com>2017-05-22 10:59:36 -0400
commit8edbf46a78494ae034e8faa982c8f8bdcd5c3ef4 (patch)
treee5484224ac87be90ffb8b24d25beb97f07ab5d01 /src/mongo/db/keys_collection_manager.h
parentb035e46ec65088885d8b934af235481f294af77f (diff)
downloadmongo-8edbf46a78494ae034e8faa982c8f8bdcd5c3ef4.tar.gz
SERVER-28127 Integrate KeyManager to LogicalClock
Diffstat (limited to 'src/mongo/db/keys_collection_manager.h')
-rw-r--r--src/mongo/db/keys_collection_manager.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mongo/db/keys_collection_manager.h b/src/mongo/db/keys_collection_manager.h
index b05b5046a7c..bfe4a27a408 100644
--- a/src/mongo/db/keys_collection_manager.h
+++ b/src/mongo/db/keys_collection_manager.h
@@ -53,9 +53,6 @@ class ShardingCatalogClient;
*/
class KeysCollectionManager {
public:
- /**
- * Creates a new instance of key manager. This should outlive the client.
- */
KeysCollectionManager(std::string purpose,
ShardingCatalogClient* client,
Seconds keyValidForInterval);
@@ -71,13 +68,17 @@ public:
const LogicalTime& forThisTime);
/**
- * Return a key that is valid for the given time. Note that this call can block if it will need
- * to do a refresh.
+ * 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.
*/
- StatusWith<KeysCollectionDocument> getKeyForSigning(OperationContext* opCtx,
- const LogicalTime& forThisTime);
+ StatusWith<KeysCollectionDocument> getKeyForSigning(const LogicalTime& forThisTime);
+
+ /**
+ * Request this manager to perform a refresh.
+ */
+ void refreshNow(OperationContext* opCtx);
/**
* Starts a background thread that will constantly update the internal cache of keys.