summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-05-05 10:19:42 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-05-05 10:19:42 +0000
commit3951cf1ed16f56674a28f4efbb7973bfbe4e7c6c (patch)
tree4ef0c232f4c0f0289f4ebe4e334e38164b5a31f4
parentbbfebdcf506f8b638ce40b28e47c3657cf002055 (diff)
Add comment about mandatory implementations.
-rw-r--r--persistence/src/vespa/persistence/spi/persistenceprovider.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/persistence/src/vespa/persistence/spi/persistenceprovider.h b/persistence/src/vespa/persistence/spi/persistenceprovider.h
index 2e7d215fc33..2bb91c776d0 100644
--- a/persistence/src/vespa/persistence/spi/persistenceprovider.h
+++ b/persistence/src/vespa/persistence/spi/persistenceprovider.h
@@ -109,6 +109,8 @@ struct PersistenceProvider
/**
* Store the given document at the given microsecond time.
+ * An implementation must always implement atleast put or putAsync.
+ * If not an eternal recursion will occur.
*/
virtual Result put(const Bucket&, Timestamp, DocumentSP, Context&);
virtual void putAsync(const Bucket &, Timestamp , DocumentSP , Context &, OperationComplete::UP );
@@ -166,6 +168,9 @@ struct PersistenceProvider
* For such a provider, iterating with removes and all versions should
* semantically be the same thing and yield the same results.
*
+ * An implementation must always implement atleast remove or removeAsync.
+ * If not an eternal recursion will occur.
+ *
* @param timestamp The timestamp for the new bucket entry.
* @param id The ID to remove
*/
@@ -182,6 +187,8 @@ struct PersistenceProvider
* resend removes. It is legal to still store a remove entry, but note that
* you will then be prone to user patterns mentioned above to fill up your
* buckets.
+ * An implementation must always implement atleast removeIfFound or removeIfFoundAsync.
+ * If not an eternal recursion will occur.
* <p/>
* @param timestamp The timestamp for the new bucket entry.
* @param id The ID to remove
@@ -200,6 +207,8 @@ struct PersistenceProvider
/**
* Partially modifies a document referenced by the document update.
+ * An implementation must always implement atleast update or updateAsync.
+ * If not an eternal recursion will occur.
*
* @param timestamp The timestamp to use for the new update entry.
* @param update The document update to apply to the stored document.