@fluidframework/container-runtime 2.0.0-dev.4.1.0.148229 → 2.0.0-dev.4.3.0.157531
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +58 -0
- package/README.md +69 -0
- package/dist/blobManager.d.ts +6 -14
- package/dist/blobManager.d.ts.map +1 -1
- package/dist/blobManager.js +50 -37
- package/dist/blobManager.js.map +1 -1
- package/dist/containerRuntime.d.ts +47 -4
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +203 -49
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStoreContext.d.ts +2 -1
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +3 -0
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStores.d.ts +5 -5
- package/dist/dataStores.d.ts.map +1 -1
- package/dist/dataStores.js +3 -6
- package/dist/dataStores.js.map +1 -1
- package/dist/gc/garbageCollection.d.ts.map +1 -1
- package/dist/gc/garbageCollection.js +5 -5
- package/dist/gc/garbageCollection.js.map +1 -1
- package/dist/gc/gcConfigs.d.ts.map +1 -1
- package/dist/gc/gcConfigs.js +1 -3
- package/dist/gc/gcConfigs.js.map +1 -1
- package/dist/gc/gcDefinitions.js +1 -1
- package/dist/gc/gcDefinitions.js.map +1 -1
- package/dist/gc/gcHelpers.d.ts.map +1 -1
- package/dist/gc/gcHelpers.js +6 -6
- package/dist/gc/gcHelpers.js.map +1 -1
- package/dist/id-compressor/appendOnlySortedMap.d.ts +146 -0
- package/dist/id-compressor/appendOnlySortedMap.d.ts.map +1 -0
- package/dist/id-compressor/appendOnlySortedMap.js +360 -0
- package/dist/id-compressor/appendOnlySortedMap.js.map +1 -0
- package/dist/id-compressor/idCompressor.d.ts +279 -0
- package/dist/id-compressor/idCompressor.d.ts.map +1 -0
- package/dist/id-compressor/idCompressor.js +1258 -0
- package/dist/id-compressor/idCompressor.js.map +1 -0
- package/dist/id-compressor/idRange.d.ts +11 -0
- package/dist/id-compressor/idRange.d.ts.map +1 -0
- package/dist/id-compressor/idRange.js +29 -0
- package/dist/id-compressor/idRange.js.map +1 -0
- package/dist/id-compressor/index.d.ts +14 -0
- package/dist/id-compressor/index.d.ts.map +1 -0
- package/dist/id-compressor/index.js +38 -0
- package/dist/id-compressor/index.js.map +1 -0
- package/dist/id-compressor/numericUuid.d.ts +59 -0
- package/dist/id-compressor/numericUuid.d.ts.map +1 -0
- package/dist/id-compressor/numericUuid.js +325 -0
- package/dist/id-compressor/numericUuid.js.map +1 -0
- package/dist/id-compressor/sessionIdNormalizer.d.ts +138 -0
- package/dist/id-compressor/sessionIdNormalizer.d.ts.map +1 -0
- package/dist/id-compressor/sessionIdNormalizer.js +488 -0
- package/dist/id-compressor/sessionIdNormalizer.js.map +1 -0
- package/dist/id-compressor/utils.d.ts +57 -0
- package/dist/id-compressor/utils.d.ts.map +1 -0
- package/dist/id-compressor/utils.js +90 -0
- package/dist/id-compressor/utils.js.map +1 -0
- package/dist/id-compressor/uuidUtilities.d.ts +30 -0
- package/dist/id-compressor/uuidUtilities.d.ts.map +1 -0
- package/dist/id-compressor/uuidUtilities.js +106 -0
- package/dist/id-compressor/uuidUtilities.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/opLifecycle/batchManager.d.ts +9 -2
- package/dist/opLifecycle/batchManager.d.ts.map +1 -1
- package/dist/opLifecycle/batchManager.js +21 -2
- package/dist/opLifecycle/batchManager.js.map +1 -1
- package/dist/opLifecycle/index.d.ts +2 -1
- package/dist/opLifecycle/index.d.ts.map +1 -1
- package/dist/opLifecycle/index.js +3 -1
- package/dist/opLifecycle/index.js.map +1 -1
- package/dist/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opDecompressor.js +2 -1
- package/dist/opLifecycle/opDecompressor.js.map +1 -1
- package/dist/opLifecycle/opGroupingManager.d.ts +14 -0
- package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -0
- package/dist/opLifecycle/opGroupingManager.js +61 -0
- package/dist/opLifecycle/opGroupingManager.js.map +1 -0
- package/dist/opLifecycle/opSplitter.d.ts +1 -1
- package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
- package/dist/opLifecycle/opSplitter.js +5 -6
- package/dist/opLifecycle/opSplitter.js.map +1 -1
- package/dist/opLifecycle/outbox.d.ts +4 -2
- package/dist/opLifecycle/outbox.d.ts.map +1 -1
- package/dist/opLifecycle/outbox.js +37 -25
- package/dist/opLifecycle/outbox.js.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.d.ts +4 -2
- package/dist/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/dist/opLifecycle/remoteMessageProcessor.js +30 -20
- package/dist/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/pendingStateManager.d.ts +1 -1
- package/dist/pendingStateManager.d.ts.map +1 -1
- package/dist/pendingStateManager.js +11 -3
- package/dist/pendingStateManager.js.map +1 -1
- package/dist/summary/index.d.ts +2 -2
- package/dist/summary/index.d.ts.map +1 -1
- package/dist/summary/index.js +4 -1
- package/dist/summary/index.js.map +1 -1
- package/dist/summary/orderedClientElection.d.ts +1 -0
- package/dist/summary/orderedClientElection.d.ts.map +1 -1
- package/dist/summary/orderedClientElection.js +19 -0
- package/dist/summary/orderedClientElection.js.map +1 -1
- package/dist/summary/runningSummarizer.d.ts +4 -3
- package/dist/summary/runningSummarizer.d.ts.map +1 -1
- package/dist/summary/runningSummarizer.js +65 -66
- package/dist/summary/runningSummarizer.js.map +1 -1
- package/dist/summary/summarizer.d.ts.map +1 -1
- package/dist/summary/summarizer.js +1 -5
- package/dist/summary/summarizer.js.map +1 -1
- package/dist/summary/summarizerHeuristics.d.ts +1 -0
- package/dist/summary/summarizerHeuristics.d.ts.map +1 -1
- package/dist/summary/summarizerHeuristics.js +3 -0
- package/dist/summary/summarizerHeuristics.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNode.js +1 -1
- package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts +128 -2
- package/dist/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js +4 -3
- package/dist/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/dist/summary/summarizerTypes.d.ts +14 -2
- package/dist/summary/summarizerTypes.d.ts.map +1 -1
- package/dist/summary/summarizerTypes.js.map +1 -1
- package/dist/summary/summaryFormat.d.ts +3 -0
- package/dist/summary/summaryFormat.d.ts.map +1 -1
- package/dist/summary/summaryFormat.js +3 -1
- package/dist/summary/summaryFormat.js.map +1 -1
- package/dist/summary/summaryGenerator.d.ts +28 -2
- package/dist/summary/summaryGenerator.d.ts.map +1 -1
- package/dist/summary/summaryGenerator.js +19 -16
- package/dist/summary/summaryGenerator.js.map +1 -1
- package/dist/summary/summaryManager.d.ts.map +1 -1
- package/dist/summary/summaryManager.js +2 -0
- package/dist/summary/summaryManager.js.map +1 -1
- package/lib/blobManager.d.ts +6 -14
- package/lib/blobManager.d.ts.map +1 -1
- package/lib/blobManager.js +50 -37
- package/lib/blobManager.js.map +1 -1
- package/lib/containerRuntime.d.ts +47 -4
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +187 -52
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStoreContext.d.ts +2 -1
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +3 -0
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/dataStores.d.ts +5 -5
- package/lib/dataStores.d.ts.map +1 -1
- package/lib/dataStores.js +3 -6
- package/lib/dataStores.js.map +1 -1
- package/lib/gc/garbageCollection.d.ts.map +1 -1
- package/lib/gc/garbageCollection.js +5 -5
- package/lib/gc/garbageCollection.js.map +1 -1
- package/lib/gc/gcConfigs.d.ts.map +1 -1
- package/lib/gc/gcConfigs.js +1 -3
- package/lib/gc/gcConfigs.js.map +1 -1
- package/lib/gc/gcDefinitions.js +1 -1
- package/lib/gc/gcDefinitions.js.map +1 -1
- package/lib/gc/gcHelpers.d.ts.map +1 -1
- package/lib/gc/gcHelpers.js +6 -6
- package/lib/gc/gcHelpers.js.map +1 -1
- package/lib/id-compressor/appendOnlySortedMap.d.ts +146 -0
- package/lib/id-compressor/appendOnlySortedMap.d.ts.map +1 -0
- package/lib/id-compressor/appendOnlySortedMap.js +355 -0
- package/lib/id-compressor/appendOnlySortedMap.js.map +1 -0
- package/lib/id-compressor/idCompressor.d.ts +279 -0
- package/lib/id-compressor/idCompressor.d.ts.map +1 -0
- package/lib/id-compressor/idCompressor.js +1248 -0
- package/lib/id-compressor/idCompressor.js.map +1 -0
- package/lib/id-compressor/idRange.d.ts +11 -0
- package/lib/id-compressor/idRange.d.ts.map +1 -0
- package/lib/id-compressor/idRange.js +25 -0
- package/lib/id-compressor/idRange.js.map +1 -0
- package/lib/id-compressor/index.d.ts +14 -0
- package/lib/id-compressor/index.d.ts.map +1 -0
- package/lib/id-compressor/index.js +14 -0
- package/lib/id-compressor/index.js.map +1 -0
- package/lib/id-compressor/numericUuid.d.ts +59 -0
- package/lib/id-compressor/numericUuid.d.ts.map +1 -0
- package/lib/id-compressor/numericUuid.js +315 -0
- package/lib/id-compressor/numericUuid.js.map +1 -0
- package/lib/id-compressor/sessionIdNormalizer.d.ts +138 -0
- package/lib/id-compressor/sessionIdNormalizer.d.ts.map +1 -0
- package/lib/id-compressor/sessionIdNormalizer.js +484 -0
- package/lib/id-compressor/sessionIdNormalizer.js.map +1 -0
- package/lib/id-compressor/utils.d.ts +57 -0
- package/lib/id-compressor/utils.d.ts.map +1 -0
- package/lib/id-compressor/utils.js +79 -0
- package/lib/id-compressor/utils.js.map +1 -0
- package/lib/id-compressor/uuidUtilities.d.ts +30 -0
- package/lib/id-compressor/uuidUtilities.d.ts.map +1 -0
- package/lib/id-compressor/uuidUtilities.js +98 -0
- package/lib/id-compressor/uuidUtilities.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/opLifecycle/batchManager.d.ts +9 -2
- package/lib/opLifecycle/batchManager.d.ts.map +1 -1
- package/lib/opLifecycle/batchManager.js +19 -1
- package/lib/opLifecycle/batchManager.js.map +1 -1
- package/lib/opLifecycle/index.d.ts +2 -1
- package/lib/opLifecycle/index.d.ts.map +1 -1
- package/lib/opLifecycle/index.js +1 -0
- package/lib/opLifecycle/index.js.map +1 -1
- package/lib/opLifecycle/opDecompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opDecompressor.js +2 -1
- package/lib/opLifecycle/opDecompressor.js.map +1 -1
- package/lib/opLifecycle/opGroupingManager.d.ts +14 -0
- package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -0
- package/lib/opLifecycle/opGroupingManager.js +57 -0
- package/lib/opLifecycle/opGroupingManager.js.map +1 -0
- package/lib/opLifecycle/opSplitter.d.ts +1 -1
- package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
- package/lib/opLifecycle/opSplitter.js +5 -6
- package/lib/opLifecycle/opSplitter.js.map +1 -1
- package/lib/opLifecycle/outbox.d.ts +4 -2
- package/lib/opLifecycle/outbox.d.ts.map +1 -1
- package/lib/opLifecycle/outbox.js +38 -26
- package/lib/opLifecycle/outbox.js.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.d.ts +4 -2
- package/lib/opLifecycle/remoteMessageProcessor.d.ts.map +1 -1
- package/lib/opLifecycle/remoteMessageProcessor.js +30 -20
- package/lib/opLifecycle/remoteMessageProcessor.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/pendingStateManager.d.ts +1 -1
- package/lib/pendingStateManager.d.ts.map +1 -1
- package/lib/pendingStateManager.js +11 -3
- package/lib/pendingStateManager.js.map +1 -1
- package/lib/summary/index.d.ts +2 -2
- package/lib/summary/index.d.ts.map +1 -1
- package/lib/summary/index.js +2 -1
- package/lib/summary/index.js.map +1 -1
- package/lib/summary/orderedClientElection.d.ts +1 -0
- package/lib/summary/orderedClientElection.d.ts.map +1 -1
- package/lib/summary/orderedClientElection.js +19 -0
- package/lib/summary/orderedClientElection.js.map +1 -1
- package/lib/summary/runningSummarizer.d.ts +4 -3
- package/lib/summary/runningSummarizer.d.ts.map +1 -1
- package/lib/summary/runningSummarizer.js +65 -66
- package/lib/summary/runningSummarizer.js.map +1 -1
- package/lib/summary/summarizer.d.ts.map +1 -1
- package/lib/summary/summarizer.js +1 -5
- package/lib/summary/summarizer.js.map +1 -1
- package/lib/summary/summarizerHeuristics.d.ts +1 -0
- package/lib/summary/summarizerHeuristics.d.ts.map +1 -1
- package/lib/summary/summarizerHeuristics.js +3 -0
- package/lib/summary/summarizerHeuristics.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNode.js +1 -1
- package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts +128 -2
- package/lib/summary/summarizerNode/summarizerNodeWithGc.d.ts.map +1 -1
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js +3 -3
- package/lib/summary/summarizerNode/summarizerNodeWithGc.js.map +1 -1
- package/lib/summary/summarizerTypes.d.ts +14 -2
- package/lib/summary/summarizerTypes.d.ts.map +1 -1
- package/lib/summary/summarizerTypes.js.map +1 -1
- package/lib/summary/summaryFormat.d.ts +3 -0
- package/lib/summary/summaryFormat.d.ts.map +1 -1
- package/lib/summary/summaryFormat.js +2 -0
- package/lib/summary/summaryFormat.js.map +1 -1
- package/lib/summary/summaryGenerator.d.ts +28 -2
- package/lib/summary/summaryGenerator.d.ts.map +1 -1
- package/lib/summary/summaryGenerator.js +17 -15
- package/lib/summary/summaryGenerator.js.map +1 -1
- package/lib/summary/summaryManager.d.ts.map +1 -1
- package/lib/summary/summaryManager.js +2 -0
- package/lib/summary/summaryManager.js.map +1 -1
- package/package.json +29 -17
- package/src/blobManager.ts +64 -41
- package/src/containerRuntime.ts +294 -65
- package/src/dataStoreContext.ts +6 -0
- package/src/dataStores.ts +4 -7
- package/src/gc/garbageCollection.ts +7 -6
- package/src/gc/gcConfigs.ts +1 -3
- package/src/gc/gcDefinitions.ts +1 -1
- package/src/gc/gcHelpers.ts +9 -6
- package/src/id-compressor/README.md +3 -0
- package/src/id-compressor/appendOnlySortedMap.ts +427 -0
- package/src/id-compressor/idCompressor.ts +1854 -0
- package/src/id-compressor/idRange.ts +35 -0
- package/src/id-compressor/index.ts +35 -0
- package/src/id-compressor/numericUuid.ts +383 -0
- package/src/id-compressor/sessionIdNormalizer.ts +609 -0
- package/src/id-compressor/utils.ts +114 -0
- package/src/id-compressor/uuidUtilities.ts +123 -0
- package/src/index.ts +1 -0
- package/src/opLifecycle/README.md +119 -0
- package/src/opLifecycle/batchManager.ts +35 -2
- package/src/opLifecycle/index.ts +2 -1
- package/src/opLifecycle/opDecompressor.ts +1 -0
- package/src/opLifecycle/opGroupingManager.ts +82 -0
- package/src/opLifecycle/opSplitter.ts +1 -5
- package/src/opLifecycle/outbox.ts +64 -26
- package/src/opLifecycle/remoteMessageProcessor.ts +38 -22
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +21 -7
- package/src/summary/index.ts +2 -1
- package/src/summary/orderedClientElection.ts +17 -1
- package/src/summary/runningSummarizer.ts +78 -77
- package/src/summary/summarizer.ts +0 -8
- package/src/summary/summarizerHeuristics.ts +4 -0
- package/src/summary/summarizerNode/summarizerNode.ts +1 -1
- package/src/summary/summarizerNode/summarizerNodeWithGc.ts +3 -3
- package/src/summary/summarizerTypes.ts +20 -3
- package/src/summary/summaryFormat.ts +4 -0
- package/src/summary/summaryGenerator.ts +22 -16
- package/src/summary/summaryManager.ts +2 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appendOnlySortedMap.js","sourceRoot":"","sources":["../../src/id-compressor/appendOnlySortedMap.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+BAA+B;AAE/B,+DAAsD;AACtD,mCAA+B;AAE/B;;;GAGG;AACH,MAAa,mBAAmB;IAG/B;;OAEG;IACH,YAAsC,UAAkC;QAAlC,eAAU,GAAV,UAAU,CAAwB;QALrD,aAAQ,GAAc,EAAE,CAAC;IAK+B,CAAC;IAE5E;;OAEG;IACH,IAAW,IAAI;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;IACjC,CAAC;IAED;;OAEG;IACI,MAAM;QACZ,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAkB,CAAC;IAC1C,CAAC;IAED;;OAEG;IACI,MAAM;QACZ,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAkB,CAAC;IACjE,CAAC;IAED;;OAEG;IACI,QAAQ;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAkB,CAAC;IAC1C,CAAC;IAED;;OAEG;IACI,QAAQ;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAkB,CAAC;IACjE,CAAC;IAED;;OAEG;IACI,KAAK;QACX,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;QAC1B,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC;QAC5B,IAAI,MAAM,KAAK,CAAC,EAAE;YACjB,OAAO,SAAS,CAAC;SACjB;QACD,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAM,EAAE,QAAQ,CAAC,CAAC,CAAM,CAAC,CAAC;IAC7C,CAAC;IAED;;OAEG;IACI,IAAI;QACV,MA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CAAC,eAAe,CACnB,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAC9B,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAChC,GAAG,CAAC,EACL,KAAK,CAAC,mCAAmC,CACzC,CAAC;aACF;YACD,IAAI,GAAG,EAAE,CAAC;SACV;IACF,CAAC;CACD;AA1ED,8DA0EC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/* eslint-disable no-bitwise */\n\nimport { assert } from \"@fluidframework/common-utils\";\nimport { fail } from \"./utils\";\n\n/**\n * A map in which entries are always added in key-sorted order.\n * Supports appending and searching.\n */\nexport class AppendOnlySortedMap<K, V> {\n\tprotected readonly elements: (K | V)[] = [];\n\n\t/**\n\t * @param comparator - a comparator for keys\n\t */\n\tpublic constructor(protected readonly comparator: (a: K, b: K) => number) {}\n\n\t/**\n\t * @returns the number of entries in this map\n\t */\n\tpublic get size(): number {\n\t\treturn this.elements.length / 2;\n\t}\n\n\t/**\n\t * @returns the min key in the map.\n\t */\n\tpublic minKey(): K | undefined {\n\t\treturn this.elements[0] as K | undefined;\n\t}\n\n\t/**\n\t * @returns the max key in the map.\n\t */\n\tpublic maxKey(): K | undefined {\n\t\treturn this.elements[this.elements.length - 2] as K | undefined;\n\t}\n\n\t/**\n\t * @returns the min value in the map.\n\t */\n\tpublic minValue(): V | undefined {\n\t\treturn this.elements[1] as V | undefined;\n\t}\n\n\t/**\n\t * @returns the min value in the map.\n\t */\n\tpublic maxValue(): V | undefined {\n\t\treturn this.elements[this.elements.length - 1] as V | undefined;\n\t}\n\n\t/**\n\t * @returns the min key in the map.\n\t */\n\tpublic first(): [K, V] | undefined {\n\t\tconst { elements } = this;\n\t\tconst { length } = elements;\n\t\tif (length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn [elements[0] as K, elements[1] as V];\n\t}\n\n\t/**\n\t * @returns the max key in the map.\n\t */\n\tpublic last(): [K, V] | undefined {\n\t\tconst { elements } = this;\n\t\tconst { length } = elements;\n\t\tif (length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst lastKeyIndex = length - 2;\n\t\treturn [elements[lastKeyIndex] as K, elements[lastKeyIndex + 1] as V];\n\t}\n\n\t/**\n\t * Returns the element at the insertion index.\n\t */\n\tpublic getAtIndex(index: number): [K, V] | undefined {\n\t\tconst realIndex = index * 2;\n\t\tconst { elements } = this;\n\t\tif (realIndex < 0 || realIndex > elements.length - 1) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn [elements[realIndex] as K, elements[realIndex + 1] as V];\n\t}\n\n\t/**\n\t * @returns an iterable of the entries in the map.\n\t */\n\tpublic *entries(): IterableIterator<readonly [K, V]> {\n\t\tconst { elements } = this;\n\t\tfor (let i = 0; i < elements.length; i += 2) {\n\t\t\tyield [elements[i] as K, elements[i + 1] as V];\n\t\t}\n\t}\n\n\t/**\n\t * @returns an iterable of the keys in the map.\n\t */\n\tpublic *keys(): IterableIterator<K> {\n\t\tconst { elements } = this;\n\t\tfor (let i = 0; i < elements.length; i += 2) {\n\t\t\tyield elements[i] as K;\n\t\t}\n\t}\n\n\t/**\n\t * @returns an iterable of the values in the map.\n\t */\n\tpublic *values(): IterableIterator<V> {\n\t\tconst { elements } = this;\n\t\tfor (let i = 0; i < elements.length; i += 2) {\n\t\t\tyield elements[i + 1] as V;\n\t\t}\n\t}\n\n\t/**\n\t * @returns an iterable of the entries in the map, reversed.\n\t */\n\tpublic *entriesReversed(): IterableIterator<readonly [K, V]> {\n\t\tconst { elements } = this;\n\t\tfor (let i = elements.length - 2; i >= 0; i -= 2) {\n\t\t\tyield [elements[i] as K, elements[i + 1] as V];\n\t\t}\n\t}\n\n\t/**\n\t * Adds a new key/value pair to the map. `key` must be \\> to all keys in the map.\n\t * @param key - the key to add.\n\t * @param value - the value to add.\n\t */\n\tpublic append(key: K, value: V): void {\n\t\tconst { elements } = this;\n\t\tconst { length } = elements;\n\t\tif (length !== 0 && this.comparator(key, this.maxKey() as K) <= 0) {\n\t\t\tfail(\"Inserted key must be > all others in the map.\");\n\t\t}\n\t\telements.push(key);\n\t\telements.push(value);\n\t}\n\n\t/**\n\t * @param key - the key to lookup.\n\t * @returns the value associated with `key` if such an entry exists, and undefined otherwise.\n\t */\n\tpublic get(key: K): V | undefined {\n\t\tconst index = AppendOnlySortedMap.keyIndexOf(this.elements, key, this.comparator);\n\t\tif (index < 0) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn this.elements[index + 1] as V;\n\t}\n\n\t/**\n\t * @param key - the key to lookup.\n\t * @returns the entry associated with `key` if such an entry exists, the entry associated with the next lower key if such an entry\n\t * exists, and undefined otherwise.\n\t */\n\tpublic getPairOrNextLower(key: K): readonly [K, V] | undefined {\n\t\treturn this.getPairOrNextLowerBy(key, this.comparator);\n\t}\n\n\t/**\n\t * @param key - the key to lookup.\n\t * @returns the entry associated with `key` if such an entry exists, the entry associated with the next higher key if such an entry\n\t * exists, and undefined otherwise.\n\t */\n\tpublic getPairOrNextHigher(key: K): readonly [K, V] | undefined {\n\t\treturn this.getPairOrNextHigherBy(key, this.comparator);\n\t}\n\n\t/**\n\t * Compares two `AppendOnlySortedMap`s.\n\t */\n\tpublic equals(\n\t\tother: AppendOnlySortedMap<K, V>,\n\t\tcompareValues: (a: V, b: V) => boolean,\n\t): boolean {\n\t\tif (other === this) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (this.elements.length !== other.elements.length) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor (let i = this.elements.length - 2; i >= 0; i -= 2) {\n\t\t\tconst keyThis = this.elements[i] as K;\n\t\t\tconst valueThis = this.elements[i + 1] as V;\n\t\t\tconst keyOther = other.elements[i] as K;\n\t\t\tconst valueOther = other.elements[i + 1] as V;\n\t\t\tif (this.comparator(keyThis, keyOther) !== 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!compareValues(valueThis, valueOther)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Test-only expensive assertions to check the internal validity of the data structure.\n\t */\n\tpublic assertValid(): void {\n\t\tlet prev: readonly [K, unknown] | undefined;\n\t\tfor (const kv of this.entries()) {\n\t\t\tif (prev !== undefined) {\n\t\t\t\tassert(\n\t\t\t\t\tthis.comparator(kv[0], prev[0]) > 0,\n\t\t\t\t\t0x47f /* Keys in map must be sorted. */,\n\t\t\t\t);\n\t\t\t}\n\t\t\tprev = kv;\n\t\t}\n\t}\n\n\t/**\n\t * Queries a range of entries.\n\t * @param from - the key to start the range query at, inclusive.\n\t * @param to - the key to end the range query at, inclusive.\n\t * @returns the range of entries.\n\t */\n\tpublic *getRange(from: K, to: K): IterableIterator<readonly [K, V]> {\n\t\tconst keyIndexFrom = this.getKeyIndexOfOrNextHigher(from, this.comparator);\n\t\tif (keyIndexFrom === undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst keyIndexTo = this.getKeyIndexOfOrNextLower(to, this.comparator);\n\t\tif (keyIndexTo === undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (let i = keyIndexFrom; i <= keyIndexTo; i += 2) {\n\t\t\tyield [this.elements[i] as K, this.elements[i + 1] as V];\n\t\t}\n\t}\n\n\tprotected getPairOrNextLowerBy<T>(\n\t\tsearch: T,\n\t\tcomparator: (search: T, key: K, value: V) => number,\n\t): readonly [K, V] | undefined {\n\t\tconst keyIndex = this.getKeyIndexOfOrNextLower(search, comparator);\n\t\tif (keyIndex === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn [this.elements[keyIndex] as K, this.elements[keyIndex + 1] as V];\n\t}\n\n\tprivate getKeyIndexOfOrNextLower<T>(\n\t\tsearch: T,\n\t\tcomparator: (search: T, key: K, value: V) => number,\n\t): number | undefined {\n\t\tconst { elements } = this;\n\t\tif (elements.length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\t\tlet keyIndex = AppendOnlySortedMap.keyIndexOf(elements, search, comparator);\n\t\tif (keyIndex < 0) {\n\t\t\tkeyIndex ^= AppendOnlySortedMap.failureXor;\n\t\t\tif (keyIndex > 0) {\n\t\t\t\treturn keyIndex - 2;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t}\n\t\treturn keyIndex;\n\t}\n\n\tprotected getPairOrNextHigherBy<T>(\n\t\tsearch: T,\n\t\tcomparator: (search: T, key: K, value: V) => number,\n\t): readonly [K, V] | undefined {\n\t\tconst keyIndex = this.getKeyIndexOfOrNextHigher(search, comparator);\n\t\tif (keyIndex === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn [this.elements[keyIndex] as K, this.elements[keyIndex + 1] as V];\n\t}\n\n\tprivate getKeyIndexOfOrNextHigher<T>(\n\t\tsearch: T,\n\t\tcomparator: (search: T, key: K, value: V) => number,\n\t): number | undefined {\n\t\tconst { elements } = this;\n\t\tconst { length } = elements;\n\t\tif (length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\t\tlet keyIndex = AppendOnlySortedMap.keyIndexOf(elements, search, comparator);\n\t\tif (keyIndex < 0) {\n\t\t\tkeyIndex ^= AppendOnlySortedMap.failureXor;\n\t\t\tif (keyIndex < length) {\n\t\t\t\treturn keyIndex;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t}\n\t\treturn keyIndex;\n\t}\n\n\t/**\n\t * The value xor'd with the result index when a search fails.\n\t */\n\tpublic static readonly failureXor = -1;\n\n\t/**\n\t * Performs a binary search on the sorted array.\n\t * @returns the index of the key for `search`, or (if not present) the index it would have been inserted into xor'd\n\t * with `failureXor`. Note that negating is not an adequate solution as that could result in -0.\n\t */\n\tpublic static keyIndexOf<T, K, V>(\n\t\telements: readonly (K | V)[],\n\t\tsearch: T,\n\t\tcomparator: (search: T, key: K, value: V) => number,\n\t): number {\n\t\t// Low, high, and mid are addresses of [K,V] pairs and *not* key indices\n\t\tlet low = 0;\n\t\tlet high = elements.length / 2;\n\t\tlet mid = high >> 1;\n\t\twhile (low < high) {\n\t\t\tconst keyIndex = mid * 2;\n\t\t\tconst c = comparator(search, elements[keyIndex] as K, elements[keyIndex + 1] as V);\n\t\t\tif (c > 0) {\n\t\t\t\tlow = mid + 1;\n\t\t\t} else if (c < 0) {\n\t\t\t\thigh = mid;\n\t\t\t} else if (c === 0) {\n\t\t\t\treturn keyIndex;\n\t\t\t} else {\n\t\t\t\tfail(\"Invalid comparator.\");\n\t\t\t}\n\t\t\tmid = (low + high) >> 1;\n\t\t}\n\t\treturn (mid * 2) ^ AppendOnlySortedMap.failureXor;\n\t}\n}\n\n/**\n * A map in which entries are always added in both key-sorted and value-sorted order.\n * Supports appending and searching.\n */\nexport class AppendOnlyDoublySortedMap<K, V, S> extends AppendOnlySortedMap<K, V> {\n\tpublic constructor(\n\t\tkeyComparator: (a: K, b: K) => number,\n\t\tprivate readonly extractSearchValue: (value: V) => S,\n\t\tprivate readonly valueComparator: (search: S, value: S) => number,\n\t) {\n\t\tsuper(keyComparator);\n\t}\n\n\tpublic override append(key: K, value: V): void {\n\t\tif (\n\t\t\tthis.elements.length !== 0 &&\n\t\t\tthis.valueComparator(\n\t\t\t\tthis.extractSearchValue(value),\n\t\t\t\tthis.extractSearchValue(this.maxValue() as V),\n\t\t\t) <= 0\n\t\t) {\n\t\t\tfail(\"Inserted value must be > all others in the map.\");\n\t\t}\n\t\tsuper.append(key, value);\n\t}\n\n\tprivate readonly compareValues = (search: S, _: K, value: V): number => {\n\t\treturn this.valueComparator(search, this.extractSearchValue(value));\n\t};\n\n\t// /**\n\t// * @param value - the value to lookup.\n\t// * @returns the key associated with `value` if such an entry exists, and undefined otherwise.\n\t// */\n\t// public getByValue(value: S): K | undefined {\n\t// const index = AppendOnlySortedMap.keyIndexOf(this.elements, value, this.compareValues);\n\t// return this.elements[index]?.[0];\n\t// }\n\n\t/**\n\t * @param searchValue - the search value to lookup.\n\t * @returns the entry who's value, when run through the extractor provided to the constructor, matches\n\t * `searchValue`. If no such entry exists, this method returns the next lower entry as determined by the value\n\t * comparator provided to the constructor. If no such entry exists, this method returns undefined.\n\t */\n\tpublic getPairOrNextLowerByValue(searchValue: S): readonly [K, V] | undefined {\n\t\treturn this.getPairOrNextLowerBy(searchValue, this.compareValues);\n\t}\n\n\t/**\n\t * @param searchValue - the search value to lookup.\n\t * @returns the entry who's value, when run through the extractor provided to the constructor, matches `searchValue`. If no such entry\n\t * exists, this method returns the next higher entry as determined by the value comparator provided to the constructor. If no such entry\n\t * exists, this method returns undefined.\n\t */\n\tpublic getPairOrNextHigherByValue(searchValue: S): readonly [K, V] | undefined {\n\t\treturn this.getPairOrNextHigherBy(searchValue, this.compareValues);\n\t}\n\n\t/**\n\t * Test-only expensive assertions to check the internal validity of the data structure.\n\t */\n\tpublic override assertValid(): void {\n\t\tsuper.assertValid();\n\t\tlet prev: readonly [unknown, V] | undefined;\n\t\tfor (const kv of this.entries()) {\n\t\t\tif (prev !== undefined) {\n\t\t\t\tassert(\n\t\t\t\t\tthis.valueComparator(\n\t\t\t\t\t\tthis.extractSearchValue(kv[1]),\n\t\t\t\t\t\tthis.extractSearchValue(prev[1]),\n\t\t\t\t\t) > 0,\n\t\t\t\t\t0x480 /* Values in map must be sorted. */,\n\t\t\t\t);\n\t\t\t}\n\t\t\tprev = kv;\n\t\t}\n\t}\n}\n"]}
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { ITelemetryLogger } from "@fluidframework/common-definitions";
|
|
6
|
+
import { IIdCompressor, IIdCompressorCore, LocalCompressedId, FinalCompressedId, SessionSpaceCompressedId, StableId, OpSpaceCompressedId, SessionId, CompressedId } from "@fluidframework/runtime-definitions";
|
|
7
|
+
import type { IdCreationRange, SerializedIdCompressorWithNoSession, SerializedIdCompressorWithOngoingSession, VersionedSerializedIdCompressor } from "@fluidframework/runtime-definitions";
|
|
8
|
+
/**
|
|
9
|
+
* Roughly equates to a minimum of 1M sessions before we start allocating 64 bit IDs.
|
|
10
|
+
* This value must *NOT* change without careful consideration to compatibility.
|
|
11
|
+
*/
|
|
12
|
+
export declare const defaultClusterCapacity = 512;
|
|
13
|
+
/**
|
|
14
|
+
* @returns true if the supplied ID is a final ID.
|
|
15
|
+
*/
|
|
16
|
+
export declare function isFinalId(id: CompressedId): id is FinalCompressedId;
|
|
17
|
+
/**
|
|
18
|
+
* @returns true if the supplied ID is a local ID.
|
|
19
|
+
*/
|
|
20
|
+
export declare function isLocalId(id: CompressedId): id is LocalCompressedId;
|
|
21
|
+
/**
|
|
22
|
+
* See {@link IIdCompressor}
|
|
23
|
+
*/
|
|
24
|
+
export declare class IdCompressor implements IIdCompressorCore, IIdCompressor {
|
|
25
|
+
readonly localSessionId: SessionId;
|
|
26
|
+
private readonly logger?;
|
|
27
|
+
/**
|
|
28
|
+
* Max allowed cluster size
|
|
29
|
+
*/
|
|
30
|
+
static maxClusterSize: number;
|
|
31
|
+
/**
|
|
32
|
+
* Trivially reach consensus on default cluster size and reserved IDs.
|
|
33
|
+
* These initial values must *NOT* change without careful consideration to compatibility.
|
|
34
|
+
*/
|
|
35
|
+
private newClusterCapacity;
|
|
36
|
+
/**
|
|
37
|
+
* The size of each newly created ID cluster.
|
|
38
|
+
*/
|
|
39
|
+
get clusterCapacity(): number;
|
|
40
|
+
/**
|
|
41
|
+
* Must only be set with a value upon which consensus has been reached. Value must be greater than zero and less than
|
|
42
|
+
* `IdCompressor.maxClusterSize`.
|
|
43
|
+
*/
|
|
44
|
+
set clusterCapacity(value: number);
|
|
45
|
+
/**
|
|
46
|
+
* Session ID -\> data about the session's current cluster.
|
|
47
|
+
* Sessions are mutable, and thus should only be created via `createSession`.
|
|
48
|
+
*/
|
|
49
|
+
private readonly sessions;
|
|
50
|
+
/**
|
|
51
|
+
* The `IdCompressor`'s current local session.
|
|
52
|
+
*/
|
|
53
|
+
private readonly localSession;
|
|
54
|
+
/**
|
|
55
|
+
* The base final ID of the next cluster to be created.
|
|
56
|
+
*/
|
|
57
|
+
private nextClusterBaseFinalId;
|
|
58
|
+
/**
|
|
59
|
+
* Total number of IDs created locally during the current session.
|
|
60
|
+
*/
|
|
61
|
+
private localIdCount;
|
|
62
|
+
/**
|
|
63
|
+
* The most recent (i.e. smallest, due to being negative) local ID in a range returned by `takeNextCreationRange`.
|
|
64
|
+
* Undefined if no non-empty ranges have ever been returned by this compressor.
|
|
65
|
+
*/
|
|
66
|
+
private lastTakenLocalId;
|
|
67
|
+
/**
|
|
68
|
+
* Maps local IDs to override strings. This will contain an entry for every override assigned to a local ID generated during
|
|
69
|
+
* the current session, and retains entries for the lifetime of this compressor.
|
|
70
|
+
*/
|
|
71
|
+
private readonly localOverrides;
|
|
72
|
+
/**
|
|
73
|
+
* Maps local IDs to the final ID they are associated with (if any), and maps final IDs to the corresponding local ID (if any).
|
|
74
|
+
* This is used to efficiently compute normalization. This map can be thought of as mapping ranges of "optimistic uncertainty"
|
|
75
|
+
* (local IDs) to the result of consensus (reserved ranges of final IDs, a.k.a. clusters). Any given range of local IDs
|
|
76
|
+
* does not necessarily span an entire cluster, as some session-space IDs may be allocated *after* a cluster has been allocated
|
|
77
|
+
* but before it is full. In this case, there is no uncertainty, as the range of final IDs was reserved when the cluster was created.
|
|
78
|
+
* However, there is always a range of local IDs with size \>= 1 associated with the beginning of every cluster, as clusters are only
|
|
79
|
+
* created *after* they are needed and thus there is some period of uncertainty after local IDs have been handed out but before the
|
|
80
|
+
* range containing them has been finalized. There may also be ranges of local IDs that do not start at the beginning of a
|
|
81
|
+
* cluster; this happens when a cluster is expanded instead of allocating a new one.
|
|
82
|
+
* Additionally, session space IDs associated with an override string will also always be local IDs, because there is uncertainty as
|
|
83
|
+
* to whether another client simultaneously allocated the same override and could get sequenced first (a.k.a. unification) and its
|
|
84
|
+
* final ID would be associated with that override.
|
|
85
|
+
* See `SessionIdNormalizer` for more.
|
|
86
|
+
*/
|
|
87
|
+
private sessionIdNormalizer;
|
|
88
|
+
/**
|
|
89
|
+
* Contains entries for cluster base UUIDs and override strings (both local and final).
|
|
90
|
+
* As a performance optimization, entries for finalized strings also include the containing cluster object.
|
|
91
|
+
* This can be viewed as three separate tables: the inverse table for `localOverrides`, the inverse table for the union of all
|
|
92
|
+
* the overrides of the clusters in `finalIdToCluster`, and the inverse lookup of cluster base UUIDs to their clusters.
|
|
93
|
+
* This is unified as a performance optimization, as the common case does not have overridden IDs. It is a btree due to the need
|
|
94
|
+
* to make range queries.
|
|
95
|
+
*/
|
|
96
|
+
private readonly clustersAndOverridesInversion;
|
|
97
|
+
/**
|
|
98
|
+
* Maps the first final ID in a cluster to its owning cluster.
|
|
99
|
+
* Can be searched in O(log n) to determine clusters for any final ID.
|
|
100
|
+
*/
|
|
101
|
+
private readonly finalIdToCluster;
|
|
102
|
+
/**
|
|
103
|
+
* @param localSessionId - the `IdCompressor`'s current local session ID.
|
|
104
|
+
* {@link generateStableId}.
|
|
105
|
+
*/
|
|
106
|
+
constructor(localSessionId: SessionId, logger?: ITelemetryLogger | undefined);
|
|
107
|
+
/**
|
|
108
|
+
* Creates a session object for the supplied ID.
|
|
109
|
+
* Must only be called once per ID.
|
|
110
|
+
* @param sessionId - the ID for the session
|
|
111
|
+
* @returns the session object for the supplied ID
|
|
112
|
+
*/
|
|
113
|
+
private createSession;
|
|
114
|
+
/**
|
|
115
|
+
* Returns a range of local IDs created by this session in a format for sending to the server for finalizing.
|
|
116
|
+
* The range will include all local IDs generated via calls to `generateCompressedId` since the last time this method was called.
|
|
117
|
+
* @returns the range of session-local IDs, which may be empty. This range must be sent to the server for ordering before
|
|
118
|
+
* it is finalized. Ranges must be sent to the server in the order that they are taken via calls to this method.
|
|
119
|
+
*/
|
|
120
|
+
takeNextCreationRange(): IdCreationRange;
|
|
121
|
+
/**
|
|
122
|
+
* Finalizes the supplied range of IDs (which may be from either a remote or local session).
|
|
123
|
+
* @param range - the range of session-local IDs to finalize.
|
|
124
|
+
*/
|
|
125
|
+
finalizeCreationRange(range: IdCreationRange): void;
|
|
126
|
+
private checkClusterForCollision;
|
|
127
|
+
private static failWithCollidingOverride;
|
|
128
|
+
private static isClusterInfo;
|
|
129
|
+
private static isUnfinalizedOverride;
|
|
130
|
+
private static createInversionKey;
|
|
131
|
+
private static isStableInversionKey;
|
|
132
|
+
/**
|
|
133
|
+
* Returns an existing ID associated with an override, or undefined if none exists.
|
|
134
|
+
*/
|
|
135
|
+
private getExistingIdsForNewOverride;
|
|
136
|
+
/**
|
|
137
|
+
* Check if `a` might be within `range` of `b`, where both are treated as hex numbers.
|
|
138
|
+
* @param range - an integer
|
|
139
|
+
*/
|
|
140
|
+
private static uuidsMightCollide;
|
|
141
|
+
/**
|
|
142
|
+
* Helper for retrieving an override.
|
|
143
|
+
*/
|
|
144
|
+
private static tryGetOverride;
|
|
145
|
+
/**
|
|
146
|
+
* Generates a new compressed ID or returns an existing one.
|
|
147
|
+
* This should ONLY be called to generate IDs for local operations.
|
|
148
|
+
* @param override - Specifies a specific string to be associated with the returned compressed ID.
|
|
149
|
+
* Performance note: assigning override strings incurs a performance overhead.
|
|
150
|
+
* @returns an existing ID if one already exists for `override`, and a new local ID otherwise. The returned ID is in session space.
|
|
151
|
+
*/
|
|
152
|
+
generateCompressedId(override?: string): SessionSpaceCompressedId;
|
|
153
|
+
/**
|
|
154
|
+
* Decompresses a previously compressed ID into a UUID or override string.
|
|
155
|
+
* @param id - the compressed ID to be decompressed.
|
|
156
|
+
* @returns the UUID or override string associated with the compressed ID. Fails if the ID was not generated by this compressor.
|
|
157
|
+
*/
|
|
158
|
+
decompress(id: SessionSpaceCompressedId | FinalCompressedId): StableId | string;
|
|
159
|
+
/**
|
|
160
|
+
* Attempts to decompress a previously compressed ID into a UUID or override string.
|
|
161
|
+
* @param id - the compressed ID to be decompressed.
|
|
162
|
+
* @returns the UUID or override string associated with the compressed ID, or undefined if the ID was not generated by this compressor.
|
|
163
|
+
*/
|
|
164
|
+
tryDecompress(id: SessionSpaceCompressedId | FinalCompressedId): StableId | string | undefined;
|
|
165
|
+
/**
|
|
166
|
+
* Recompresses a decompressed ID, which could be a UUID or an override string.
|
|
167
|
+
* @param uncompressed - the UUID or override string to recompress.
|
|
168
|
+
* @returns the `CompressedId` associated with `uncompressed`. Fails if it has not been previously compressed by this compressor.
|
|
169
|
+
*/
|
|
170
|
+
recompress(uncompressed: string): SessionSpaceCompressedId;
|
|
171
|
+
/**
|
|
172
|
+
* Attempts to recompresses a decompressed ID, which could be a UUID or an override string.
|
|
173
|
+
* @param uncompressed - the UUID or override string to recompress,
|
|
174
|
+
* @returns the `CompressedId` associated with `uncompressed` or undefined if it has not been previously compressed by this compressor.
|
|
175
|
+
*/
|
|
176
|
+
tryRecompress(uncompressed: string): SessionSpaceCompressedId | undefined;
|
|
177
|
+
/**
|
|
178
|
+
* Helper to compress an uncompressed UUID. It can optionally be supplied with the numeric form of `uncompressedUuid` as a
|
|
179
|
+
* performance optimization.
|
|
180
|
+
*/
|
|
181
|
+
private recompressInternal;
|
|
182
|
+
/**
|
|
183
|
+
* Normalizes a session space ID into op space.
|
|
184
|
+
* @param id - the local ID to normalize.
|
|
185
|
+
* @returns the ID in op space.
|
|
186
|
+
*/
|
|
187
|
+
normalizeToOpSpace(id: SessionSpaceCompressedId): OpSpaceCompressedId;
|
|
188
|
+
/**
|
|
189
|
+
* Normalizes an ID into session space.
|
|
190
|
+
* @param id - the ID to normalize. If it is a local ID, it is assumed to have been created by the session corresponding
|
|
191
|
+
* to `sessionId`.
|
|
192
|
+
* @param originSessionId - the session from which `id` originated
|
|
193
|
+
* @returns the session-space ID corresponding to `id`, which might not have been a final ID if the client that created it had not yet
|
|
194
|
+
* finalized it. This can occur when a client references an ID during the window of time in which it is waiting to receive the ordered
|
|
195
|
+
* range that contained it from the server.
|
|
196
|
+
*/
|
|
197
|
+
normalizeToSessionSpace(id: OpSpaceCompressedId, originSessionId: SessionId): SessionSpaceCompressedId;
|
|
198
|
+
/**
|
|
199
|
+
* Normalizes a final ID into session space.
|
|
200
|
+
* @param id - the final ID to normalize.
|
|
201
|
+
* @returns the session-space ID corresponding to `id`.
|
|
202
|
+
*/
|
|
203
|
+
normalizeToSessionSpace(id: FinalCompressedId): SessionSpaceCompressedId;
|
|
204
|
+
/**
|
|
205
|
+
* Returns the session-space compressed ID corresponding to the numeric UUID, or undefined if it is not known to this compressor.
|
|
206
|
+
* Typically, it will return the session-space ID sequentially aligned with it (which will be local if `numericUuid` was made by
|
|
207
|
+
* the local session, or final otherwise). However, in the event that the aligned session-space ID was overridden with a UUID
|
|
208
|
+
* *and* that override UUID was concurrently used in an older ID (earlier, w.r.t. sequencing), this method can return the first
|
|
209
|
+
* ID to correspond to that override.
|
|
210
|
+
*
|
|
211
|
+
* As an example, consider the following two clients:
|
|
212
|
+
* ClientA, session UUID: A0000000-0000-0000-0000-000000000000
|
|
213
|
+
* ClientB, session UUID: B0000000-0000-0000-0000-000000000000
|
|
214
|
+
*
|
|
215
|
+
* If concurrently, two clients performed:
|
|
216
|
+
* ClientA: generateCompressedId(override: 'X0000000-0000-0000-0000-000000000000') // aligned with A0000000-0000-0000-0000-000000000000
|
|
217
|
+
*
|
|
218
|
+
* ClientB: generateCompressedId() // aligned with B0000000-0000-0000-0000-000000000000
|
|
219
|
+
* ClientB: generateCompressedId(override: 'X0000000-0000-0000-0000-000000000000') // aligned with B0000000-0000-0000-0000-000000000001
|
|
220
|
+
*
|
|
221
|
+
* After sequencing, calling this method and passing the numeric UUID for B0000000-0000-0000-0000-000000000001 would return the
|
|
222
|
+
* session-space ID corresponding to A0000000-0000-0000-0000-000000000000 (with override X0000000-0000-0000-0000-000000000000).
|
|
223
|
+
*/
|
|
224
|
+
private compressNumericUuid;
|
|
225
|
+
/**
|
|
226
|
+
* Returns a compressed ID for the supplied stable ID if it was created by the local session, and undefined otherwise.
|
|
227
|
+
*/
|
|
228
|
+
private getCompressedIdForStableId;
|
|
229
|
+
private getClusterForFinalId;
|
|
230
|
+
/**
|
|
231
|
+
* @returns if `other` is equal to this `IdCompressor`. The equality check includes local session state only if specified.
|
|
232
|
+
* \@testOnly
|
|
233
|
+
*/
|
|
234
|
+
equals(other: IdCompressor, compareLocalState: boolean): boolean;
|
|
235
|
+
private static sessionDataEqual;
|
|
236
|
+
private static idClustersEqual;
|
|
237
|
+
/**
|
|
238
|
+
* Returns a persistable form of the current state of this `IdCompressor` which can be rehydrated via `IdCompressor.deserialize()`.
|
|
239
|
+
* This includes finalized state as well as un-finalized state and is therefore suitable for use in offline scenarios.
|
|
240
|
+
*/
|
|
241
|
+
serialize(withSession: boolean): SerializedIdCompressorWithOngoingSession | SerializedIdCompressorWithNoSession;
|
|
242
|
+
/**
|
|
243
|
+
* Returns a persistable form of the current state of this `IdCompressor` which can be rehydrated via `IdCompressor.deserialize()`.
|
|
244
|
+
* This includes finalized state as well as un-finalized state and is therefore suitable for use in offline scenarios.
|
|
245
|
+
*/
|
|
246
|
+
serialize(withSession: true): SerializedIdCompressorWithOngoingSession;
|
|
247
|
+
/**
|
|
248
|
+
* Returns a persistable form of the current state of this `IdCompressor` which can be rehydrated via `IdCompressor.deserialize()`.
|
|
249
|
+
* This only includes finalized state and is therefore suitable for use in summaries.
|
|
250
|
+
*/
|
|
251
|
+
serialize(withSession: false): SerializedIdCompressorWithNoSession;
|
|
252
|
+
/**
|
|
253
|
+
* Deserialize an serialized IdCompressor that is part of an ongoing session, thereby resuming that session.
|
|
254
|
+
*/
|
|
255
|
+
static deserialize(serialized: SerializedIdCompressorWithOngoingSession): IdCompressor;
|
|
256
|
+
/**
|
|
257
|
+
* Deserialize a serialized IdCompressor with a new session.
|
|
258
|
+
* @param serialized - the serialized compressor state
|
|
259
|
+
* @param newSessionId - the session ID for the new compressor.
|
|
260
|
+
*/
|
|
261
|
+
static deserialize(serialized: SerializedIdCompressorWithNoSession, newSessionId: SessionId): IdCompressor;
|
|
262
|
+
/**
|
|
263
|
+
* Converts the given serialized compressor to the current version.
|
|
264
|
+
* @param serializedCompressor - the serialized compressor to convert. Must not have been serialized with an ongoing session.
|
|
265
|
+
* @returns a serialized compressor with no ongoing session.
|
|
266
|
+
*/
|
|
267
|
+
static convertToCurrentVersion(serializedCompressor: VersionedSerializedIdCompressor, hasSession: false): SerializedIdCompressorWithNoSession;
|
|
268
|
+
/**
|
|
269
|
+
* Converts the given serialized compressor to the current version.
|
|
270
|
+
* @param serializedCompressor - the serialized compressor to convert. Must have been serialized with an ongoing session.
|
|
271
|
+
* @returns a serialized compressor with the same ongoing session.
|
|
272
|
+
*/
|
|
273
|
+
static convertToCurrentVersion(serializedCompressor: VersionedSerializedIdCompressor, hasSession: true): SerializedIdCompressorWithOngoingSession;
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* @returns whether or not the given serialized ID compressor has an ongoing session.
|
|
277
|
+
*/
|
|
278
|
+
export declare function hasOngoingSession(serialized: SerializedIdCompressorWithNoSession | SerializedIdCompressorWithOngoingSession): serialized is SerializedIdCompressorWithOngoingSession;
|
|
279
|
+
//# sourceMappingURL=idCompressor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"idCompressor.d.ts","sourceRoot":"","sources":["../../src/id-compressor/idCompressor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEtE,OAAO,EACN,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,wBAAwB,EACxB,QAAQ,EACR,mBAAmB,EACnB,SAAS,EACT,YAAY,EACZ,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EACX,eAAe,EAIf,mCAAmC,EACnC,wCAAwC,EAIxC,+BAA+B,EAC/B,MAAM,qCAAqC,CAAC;AAmG7C;;;GAGG;AACH,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAU1C;;GAEG;AACH,wBAAgB,SAAS,CAAC,EAAE,EAAE,YAAY,GAAG,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