@@ -654,83 +654,6 @@ class KVStoreStats {
654654 }
655655};
656656
657- /* *
658- * Properties of the storage layer.
659- *
660- * If concurrent filesystem access is possible, maxConcurrency() will
661- * be greater than one. One will need to determine whether more than
662- * one writer is possible as well as whether more than one reader is
663- * possible.
664- */
665- class StorageProperties {
666- public:
667- enum class ByIdScan : bool { Yes, No };
668-
669- /* *
670- * Will the KVStore de-dupe items such that only the highest seqno for any
671- * given key in a single flush batch is persisted?
672- */
673- enum class AutomaticDeduplication : bool { Yes, No };
674-
675- /* *
676- * Will the KVStore count items in the prepare namespace (and update the
677- * values appropriately in the vbstate)
678- */
679- enum class PrepareCounting : bool { Yes, No };
680-
681- /* *
682- * Will the KVStore make callbacks with stale (superseded) items during
683- * compaction?
684- */
685- enum class CompactionStaleItemCallbacks : bool { Yes, No };
686-
687- /* *
688- * Does the KVStore support history retention (suitable for change streams)
689- */
690- enum class HistoryRetentionAvailable : bool { Yes, No };
691-
692- StorageProperties (ByIdScan byIdScan,
693- AutomaticDeduplication automaticDeduplication,
694- PrepareCounting prepareCounting,
695- CompactionStaleItemCallbacks compactionStaleItemCallbacks,
696- HistoryRetentionAvailable historyRetentionAvailable)
697- : byIdScan(byIdScan),
698- automaticDeduplication (automaticDeduplication),
699- prepareCounting(prepareCounting),
700- compactionStaleItemCallbacks(compactionStaleItemCallbacks),
701- historyRetentionAvailable(historyRetentionAvailable) {
702- }
703-
704- bool hasByIdScan () const {
705- return byIdScan == ByIdScan::Yes;
706- }
707-
708- bool hasAutomaticDeduplication () const {
709- return automaticDeduplication == AutomaticDeduplication::Yes;
710- }
711-
712- bool hasPrepareCounting () const {
713- return prepareCounting == PrepareCounting::Yes;
714- }
715-
716- bool hasCompactionStaleItemCallbacks () const {
717- return compactionStaleItemCallbacks ==
718- CompactionStaleItemCallbacks::Yes;
719- }
720-
721- bool canRetainHistory () const {
722- return historyRetentionAvailable == HistoryRetentionAvailable::Yes;
723- }
724-
725- private:
726- ByIdScan byIdScan;
727- AutomaticDeduplication automaticDeduplication;
728- PrepareCounting prepareCounting;
729- CompactionStaleItemCallbacks compactionStaleItemCallbacks;
730- HistoryRetentionAvailable historyRetentionAvailable;
731- };
732-
733-
734657/* *
735658 * Base class for some KVStores that implements common functionality.
736659 */
0 commit comments