@fluid-experimental/tree 0.59.2001 → 0.59.3000
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/.eslintrc.js +2 -0
- package/.vscode/SharedTree.code-workspace +15 -0
- package/.vscode/settings.json +6 -0
- package/dist/ChangeCompression.js +9 -9
- package/dist/ChangeCompression.js.map +1 -1
- package/dist/ChangeTypes.d.ts +1 -6
- package/dist/ChangeTypes.d.ts.map +1 -1
- package/dist/ChangeTypes.js +5 -5
- package/dist/ChangeTypes.js.map +1 -1
- package/dist/Checkout.js +14 -14
- package/dist/Checkout.js.map +1 -1
- package/dist/Common.d.ts +21 -3
- package/dist/Common.d.ts.map +1 -1
- package/dist/Common.js +29 -4
- package/dist/Common.js.map +1 -1
- package/dist/EditLog.js +26 -25
- package/dist/EditLog.js.map +1 -1
- package/dist/EditUtilities.js +17 -17
- package/dist/EditUtilities.js.map +1 -1
- package/dist/Forest.js +31 -31
- package/dist/Forest.js.map +1 -1
- package/dist/HistoryEditFactory.js +9 -9
- package/dist/HistoryEditFactory.js.map +1 -1
- package/dist/IdConversion.js +9 -9
- package/dist/IdConversion.js.map +1 -1
- package/dist/Identifiers.d.ts +4 -0
- package/dist/Identifiers.d.ts.map +1 -1
- package/dist/Identifiers.js.map +1 -1
- package/dist/LogViewer.d.ts +1 -5
- package/dist/LogViewer.d.ts.map +1 -1
- package/dist/LogViewer.js +11 -19
- package/dist/LogViewer.js.map +1 -1
- package/dist/MergeHealth.js +2 -2
- package/dist/MergeHealth.js.map +1 -1
- package/dist/NodeIdUtilities.js +2 -2
- package/dist/NodeIdUtilities.js.map +1 -1
- package/dist/PayloadUtilities.js +1 -1
- package/dist/PayloadUtilities.js.map +1 -1
- package/dist/RevisionValueCache.d.ts +13 -10
- package/dist/RevisionValueCache.d.ts.map +1 -1
- package/dist/RevisionValueCache.js +14 -11
- package/dist/RevisionValueCache.js.map +1 -1
- package/dist/RevisionView.js +4 -4
- package/dist/RevisionView.js.map +1 -1
- package/dist/SerializationUtilities.js +4 -4
- package/dist/SerializationUtilities.js.map +1 -1
- package/dist/SharedTree.d.ts +93 -31
- package/dist/SharedTree.d.ts.map +1 -1
- package/dist/SharedTree.js +160 -131
- package/dist/SharedTree.js.map +1 -1
- package/dist/SharedTreeEncoder.d.ts +3 -3
- package/dist/SharedTreeEncoder.d.ts.map +1 -1
- package/dist/SharedTreeEncoder.js +36 -36
- package/dist/SharedTreeEncoder.js.map +1 -1
- package/dist/StringInterner.js +1 -1
- package/dist/StringInterner.js.map +1 -1
- package/dist/Summary.js +1 -1
- package/dist/Summary.js.map +1 -1
- package/dist/SummaryBackCompatibility.js +8 -8
- package/dist/SummaryBackCompatibility.js.map +1 -1
- package/dist/Transaction.js +1 -1
- package/dist/Transaction.js.map +1 -1
- package/dist/TransactionInternal.js +17 -17
- package/dist/TransactionInternal.js.map +1 -1
- package/dist/TreeCompressor.d.ts.map +1 -1
- package/dist/TreeCompressor.js +6 -8
- package/dist/TreeCompressor.js.map +1 -1
- package/dist/TreeNodeHandle.js +4 -4
- package/dist/TreeNodeHandle.js.map +1 -1
- package/dist/TreeView.js +7 -7
- package/dist/TreeView.js.map +1 -1
- package/dist/TreeViewUtilities.js +2 -2
- package/dist/TreeViewUtilities.js.map +1 -1
- package/dist/UndoRedoHandler.js +1 -1
- package/dist/UndoRedoHandler.js.map +1 -1
- package/dist/UuidUtilities.d.ts +30 -0
- package/dist/UuidUtilities.d.ts.map +1 -0
- package/dist/UuidUtilities.js +106 -0
- package/dist/UuidUtilities.js.map +1 -0
- package/dist/id-compressor/AppendOnlySortedMap.d.ts +52 -28
- package/dist/id-compressor/AppendOnlySortedMap.d.ts.map +1 -1
- package/dist/id-compressor/AppendOnlySortedMap.js +167 -90
- package/dist/id-compressor/AppendOnlySortedMap.js.map +1 -1
- package/dist/id-compressor/IdCompressor.d.ts +43 -42
- package/dist/id-compressor/IdCompressor.d.ts.map +1 -1
- package/dist/id-compressor/IdCompressor.js +179 -177
- package/dist/id-compressor/IdCompressor.js.map +1 -1
- package/dist/id-compressor/IdRange.js +1 -1
- package/dist/id-compressor/IdRange.js.map +1 -1
- package/dist/id-compressor/NumericUuid.d.ts +6 -14
- package/dist/id-compressor/NumericUuid.d.ts.map +1 -1
- package/dist/id-compressor/NumericUuid.js +15 -76
- package/dist/id-compressor/NumericUuid.js.map +1 -1
- package/dist/id-compressor/SessionIdNormalizer.d.ts +122 -0
- package/dist/id-compressor/SessionIdNormalizer.d.ts.map +1 -0
- package/dist/id-compressor/SessionIdNormalizer.js +418 -0
- package/dist/id-compressor/SessionIdNormalizer.js.map +1 -0
- package/dist/id-compressor/persisted-types/0.0.1.d.ts +6 -13
- package/dist/id-compressor/persisted-types/0.0.1.d.ts.map +1 -1
- package/dist/id-compressor/persisted-types/0.0.1.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/persisted-types/0.1.1.d.ts +1 -6
- package/dist/persisted-types/0.1.1.d.ts.map +1 -1
- package/dist/persisted-types/0.1.1.js +3 -3
- package/dist/persisted-types/0.1.1.js.map +1 -1
- package/lib/ChangeTypes.d.ts +1 -6
- package/lib/ChangeTypes.d.ts.map +1 -1
- package/lib/Checkout.js.map +1 -1
- package/lib/Common.d.ts +21 -3
- package/lib/Common.d.ts.map +1 -1
- package/lib/Common.js +25 -3
- package/lib/Common.js.map +1 -1
- package/lib/EditLog.js +2 -1
- package/lib/EditLog.js.map +1 -1
- package/lib/EditUtilities.js.map +1 -1
- package/lib/Forest.js.map +1 -1
- package/lib/HistoryEditFactory.js.map +1 -1
- package/lib/Identifiers.d.ts +4 -0
- package/lib/Identifiers.d.ts.map +1 -1
- package/lib/Identifiers.js.map +1 -1
- package/lib/LogViewer.d.ts +1 -5
- package/lib/LogViewer.d.ts.map +1 -1
- package/lib/LogViewer.js +5 -13
- package/lib/LogViewer.js.map +1 -1
- package/lib/MergeHealth.js.map +1 -1
- package/lib/NodeIdUtilities.js.map +1 -1
- package/lib/RevisionValueCache.d.ts +13 -10
- package/lib/RevisionValueCache.d.ts.map +1 -1
- package/lib/RevisionValueCache.js +10 -7
- package/lib/RevisionValueCache.js.map +1 -1
- package/lib/RevisionView.js.map +1 -1
- package/lib/SharedTree.d.ts +93 -31
- package/lib/SharedTree.d.ts.map +1 -1
- package/lib/SharedTree.js +107 -78
- package/lib/SharedTree.js.map +1 -1
- package/lib/SharedTreeEncoder.d.ts +3 -3
- package/lib/SharedTreeEncoder.d.ts.map +1 -1
- package/lib/SharedTreeEncoder.js +4 -4
- package/lib/SharedTreeEncoder.js.map +1 -1
- package/lib/StringInterner.js.map +1 -1
- package/lib/Summary.js.map +1 -1
- package/lib/TreeCompressor.d.ts.map +1 -1
- package/lib/TreeCompressor.js +1 -3
- package/lib/TreeCompressor.js.map +1 -1
- package/lib/TreeNodeHandle.js.map +1 -1
- package/lib/TreeView.js.map +1 -1
- package/lib/TreeViewUtilities.js.map +1 -1
- package/lib/UuidUtilities.d.ts +30 -0
- package/lib/UuidUtilities.d.ts.map +1 -0
- package/lib/UuidUtilities.js +98 -0
- package/lib/UuidUtilities.js.map +1 -0
- package/lib/id-compressor/AppendOnlySortedMap.d.ts +52 -28
- package/lib/id-compressor/AppendOnlySortedMap.d.ts.map +1 -1
- package/lib/id-compressor/AppendOnlySortedMap.js +165 -88
- package/lib/id-compressor/AppendOnlySortedMap.js.map +1 -1
- package/lib/id-compressor/IdCompressor.d.ts +43 -42
- package/lib/id-compressor/IdCompressor.d.ts.map +1 -1
- package/lib/id-compressor/IdCompressor.js +97 -95
- package/lib/id-compressor/IdCompressor.js.map +1 -1
- package/lib/id-compressor/NumericUuid.d.ts +6 -14
- package/lib/id-compressor/NumericUuid.d.ts.map +1 -1
- package/lib/id-compressor/NumericUuid.js +11 -70
- package/lib/id-compressor/NumericUuid.js.map +1 -1
- package/lib/id-compressor/SessionIdNormalizer.d.ts +122 -0
- package/lib/id-compressor/SessionIdNormalizer.d.ts.map +1 -0
- package/lib/id-compressor/SessionIdNormalizer.js +414 -0
- package/lib/id-compressor/SessionIdNormalizer.js.map +1 -0
- package/lib/id-compressor/persisted-types/0.0.1.d.ts +6 -13
- package/lib/id-compressor/persisted-types/0.0.1.d.ts.map +1 -1
- package/lib/id-compressor/persisted-types/0.0.1.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/persisted-types/0.1.1.d.ts +1 -6
- package/lib/persisted-types/0.1.1.d.ts.map +1 -1
- package/lib/persisted-types/0.1.1.js.map +1 -1
- package/lib/test/AppendOnlySortedMap.perf.tests.d.ts +6 -0
- package/lib/test/AppendOnlySortedMap.perf.tests.d.ts.map +1 -0
- package/lib/test/AppendOnlySortedMap.perf.tests.js +49 -0
- package/lib/test/AppendOnlySortedMap.perf.tests.js.map +1 -0
- package/lib/test/AppendOnlySortedMap.tests.js +56 -14
- package/lib/test/AppendOnlySortedMap.tests.js.map +1 -1
- package/lib/test/Checkout.tests.js +2 -2
- package/lib/test/Checkout.tests.js.map +1 -1
- package/lib/test/Forest.tests.js.map +1 -1
- package/lib/test/IdCompressor.perf.tests.js +8 -2
- package/lib/test/IdCompressor.perf.tests.js.map +1 -1
- package/lib/test/IdCompressor.tests.js +75 -24
- package/lib/test/IdCompressor.tests.js.map +1 -1
- package/lib/test/LogViewer.tests.js +3 -5
- package/lib/test/LogViewer.tests.js.map +1 -1
- package/lib/test/NumericUuid.perf.tests.js +4 -4
- package/lib/test/NumericUuid.perf.tests.js.map +1 -1
- package/lib/test/NumericUuid.tests.js +5 -4
- package/lib/test/NumericUuid.tests.js.map +1 -1
- package/lib/test/RevisionValueCache.tests.js.map +1 -1
- package/lib/test/RevisionView.tests.js.map +1 -1
- package/lib/test/SessionIdNormalizer.tests.d.ts +6 -0
- package/lib/test/SessionIdNormalizer.tests.d.ts.map +1 -0
- package/lib/test/SessionIdNormalizer.tests.js +299 -0
- package/lib/test/SessionIdNormalizer.tests.js.map +1 -0
- package/lib/test/Summary.tests.js +1 -1
- package/lib/test/Summary.tests.js.map +1 -1
- package/lib/test/TreeCompression.tests.js +1 -1
- package/lib/test/TreeCompression.tests.js.map +1 -1
- package/lib/test/Virtualization.tests.js +1 -1
- package/lib/test/Virtualization.tests.js.map +1 -1
- package/lib/test/fuzz/Generators.d.ts +3 -14
- package/lib/test/fuzz/Generators.d.ts.map +1 -1
- package/lib/test/fuzz/Generators.js +60 -151
- package/lib/test/fuzz/Generators.js.map +1 -1
- package/lib/test/fuzz/SharedTreeFuzzTests.d.ts +10 -7
- package/lib/test/fuzz/SharedTreeFuzzTests.d.ts.map +1 -1
- package/lib/test/fuzz/SharedTreeFuzzTests.js +94 -104
- package/lib/test/fuzz/SharedTreeFuzzTests.js.map +1 -1
- package/lib/test/fuzz/Types.d.ts +2 -9
- package/lib/test/fuzz/Types.d.ts.map +1 -1
- package/lib/test/fuzz/Types.js +1 -1
- package/lib/test/fuzz/Types.js.map +1 -1
- package/lib/test/utilities/IdCompressorTestUtilities.d.ts +57 -11
- package/lib/test/utilities/IdCompressorTestUtilities.d.ts.map +1 -1
- package/lib/test/utilities/IdCompressorTestUtilities.js +112 -98
- package/lib/test/utilities/IdCompressorTestUtilities.js.map +1 -1
- package/lib/test/utilities/PendingLocalStateTests.d.ts.map +1 -1
- package/lib/test/utilities/PendingLocalStateTests.js +2 -1
- package/lib/test/utilities/PendingLocalStateTests.js.map +1 -1
- package/lib/test/utilities/SharedTreeTests.d.ts.map +1 -1
- package/lib/test/utilities/SharedTreeTests.js +30 -1
- package/lib/test/utilities/SharedTreeTests.js.map +1 -1
- package/lib/test/utilities/SharedTreeVersioningTests.d.ts.map +1 -1
- package/lib/test/utilities/SharedTreeVersioningTests.js +20 -0
- package/lib/test/utilities/SharedTreeVersioningTests.js.map +1 -1
- package/lib/test/utilities/SummaryLoadPerfTests.d.ts.map +1 -1
- package/lib/test/utilities/SummaryLoadPerfTests.js +6 -3
- package/lib/test/utilities/SummaryLoadPerfTests.js.map +1 -1
- package/lib/test/utilities/TestNode.js.map +1 -1
- package/lib/test/utilities/TestUtilities.d.ts +9 -1
- package/lib/test/utilities/TestUtilities.d.ts.map +1 -1
- package/lib/test/utilities/TestUtilities.js +27 -13
- package/lib/test/utilities/TestUtilities.js.map +1 -1
- package/package.json +19 -17
- package/src/Common.ts +42 -4
- package/src/EditLog.ts +1 -1
- package/src/Identifiers.ts +5 -0
- package/src/LogViewer.ts +4 -20
- package/src/RevisionValueCache.ts +11 -8
- package/src/SharedTree.ts +222 -75
- package/src/SharedTreeEncoder.ts +17 -11
- package/src/TreeCompressor.ts +2 -4
- package/src/UuidUtilities.ts +123 -0
- package/src/id-compressor/AppendOnlySortedMap.ts +183 -94
- package/src/id-compressor/IdCompressor.ts +144 -132
- package/src/id-compressor/NumericUuid.ts +11 -80
- package/src/id-compressor/SessionIdNormalizer.ts +497 -0
- package/src/id-compressor/persisted-types/0.0.1.ts +12 -15
- package/src/index.ts +5 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppendOnlySortedMap.js","sourceRoot":"","sources":["../../src/id-compressor/AppendOnlySortedMap.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,+BAA+B;AAE/B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IAG/B;;OAEG;IACH,YAAsC,UAAkC;QAAlC,eAAU,GAAV,UAAU,CAAwB;QALrD,aAAQ,GAAa,EAAE,CAAC;QA4E1B,gBAAW,GAAG,CAAC,MAAS,EAAE,OAAwB,EAAU,EAAE;YAC9E,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5C,CAAC,CAAC;IAzEyE,CAAC;IAE5E;;OAEG;IACH,IAAW,IAAI;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;IAC7B,CAAC;IAED;;O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,CAAC,QAAQ,CAAC,KAAK,CAAC,0CAAG,CAAC,EAAE;IAClC,CAAC;IAED;;;;;OAKG;IACI,yBAAyB,CAAC,WAAc;QAC9C,OAAO,IAAI,CAAC,oBAAoB,CAAC,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IACnE,CAAC;IAED;;;;;OAKG;IACI,0BAA0B,CAAC,WAAc;QAC/C,OAAO,IAAI,CAAC,qBAAqB,CAAC,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IACpE,CAAC;CACD","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 { fail } from '../Common';\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;\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]?.[0];\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.size - 1]?.[0];\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\tfor (const entry of this.elements) {\n\t\t\tyield entry;\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\tfor (const entry of this.elements) {\n\t\t\tyield entry[0];\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\tfor (const entry of this.elements) {\n\t\t\tyield entry[1];\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\tfor (let i = this.size - 1; i >= 0; i--) {\n\t\t\tyield this.elements[i];\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\tif (this.size !== 0 && this.comparator(key, this.elements[this.size - 1][0]) <= 0) {\n\t\t\tfail('Inserted key must be > all others in the map.');\n\t\t}\n\t\tthis.elements.push([key, value]);\n\t}\n\n\tprivate readonly compareKeys = (search: K, element: readonly [K, V]): number => {\n\t\treturn this.comparator(search, element[0]);\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.indexOf(this.elements, key, this.compareKeys);\n\t\treturn this.elements[index]?.[1];\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.compareKeys);\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.compareKeys);\n\t}\n\n\t/**\n\t * Compares two `AppendOnlySortedMap`s.\n\t */\n\tpublic equals(other: AppendOnlySortedMap<K, V>, compareValues: (a: V, b: V) => boolean): boolean {\n\t\tif (other === this) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (this.size !== other.size) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor (let i = this.size - 1; i >= 0; i--) {\n\t\t\tconst [keyThis, valueThis] = this.elements[i];\n\t\t\tconst [keyOther, valueOther] = other.elements[i];\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 * 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 indexFrom = this.getIndexOfOrNextHigher(from, this.compareKeys);\n\t\tif (indexFrom === undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst indexTo = this.getIndexOfOrNextLower(to, this.compareKeys);\n\t\tif (indexTo === undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (let i = indexFrom; i <= indexTo; i++) {\n\t\t\tyield this.elements[i];\n\t\t}\n\t}\n\n\tprotected getPairOrNextLowerBy<T>(\n\t\tsearch: T,\n\t\tcomparator: (search: T, element: readonly [K, V]) => number\n\t): readonly [K, V] | undefined {\n\t\tconst index = this.getIndexOfOrNextLower(search, comparator);\n\t\tif (index === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn this.elements[index];\n\t}\n\n\tprivate getIndexOfOrNextLower<T>(\n\t\tsearch: T,\n\t\tcomparator: (search: T, element: readonly [K, V]) => number\n\t): number | undefined {\n\t\tconst { size } = this;\n\t\tif (size === 0) {\n\t\t\treturn undefined;\n\t\t}\n\t\tlet index = AppendOnlySortedMap.indexOf(this.elements, search, comparator);\n\t\tif (index < 0) {\n\t\t\tindex ^= AppendOnlySortedMap.failureXor;\n\t\t\tif (index > 0) {\n\t\t\t\treturn index - 1;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t}\n\t\treturn index;\n\t}\n\n\tprotected getPairOrNextHigherBy<T>(\n\t\tsearch: T,\n\t\tcomparator: (search: T, element: readonly [K, V]) => number\n\t): readonly [K, V] | undefined {\n\t\tconst index = this.getIndexOfOrNextHigher(search, comparator);\n\t\tif (index === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn this.elements[index];\n\t}\n\n\tprivate getIndexOfOrNextHigher<T>(\n\t\tsearch: T,\n\t\tcomparator: (search: T, element: readonly [K, V]) => number\n\t): number | undefined {\n\t\tconst { size } = this;\n\t\tif (size === 0) {\n\t\t\treturn undefined;\n\t\t}\n\t\tlet index = AppendOnlySortedMap.indexOf(this.elements, search, comparator);\n\t\tif (index < 0) {\n\t\t\tindex ^= AppendOnlySortedMap.failureXor;\n\t\t\tif (index < size) {\n\t\t\t\treturn index;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t}\n\t\treturn index;\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 * @param elements\n\t * @param search\n\t * @param comparator\n\t * @returns the index of `search`, or (if not present) the index it would have been inserted into xor'd with `failureXor`. Note that\n\t * negating is not an adequate solution as that could result in -0.\n\t */\n\tpublic static indexOf<T, K, V>(\n\t\telements: readonly (readonly [K, V])[],\n\t\tsearch: T,\n\t\tcomparator: (search: T, element: readonly [K, V]) => number\n\t): number {\n\t\tlet low = 0;\n\t\tlet high = elements.length;\n\t\tlet mid = high >> 1;\n\t\twhile (low < high) {\n\t\t\tconst c = comparator(search, elements[mid]);\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 mid;\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 ^ 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: V) => number\n\t) {\n\t\tsuper(keyComparator);\n\t}\n\n\tpublic append(key: K, value: V): void {\n\t\tif (\n\t\t\tthis.size !== 0 &&\n\t\t\tthis.valueComparator(this.extractSearchValue(value), this.elements[this.size - 1][1]) <= 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, element: readonly [K, V]): number => {\n\t\treturn this.valueComparator(search, element[1]);\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\tpublic getByValue(value: S): K | undefined {\n\t\tconst index = AppendOnlySortedMap.indexOf(this.elements, value, this.compareValues);\n\t\treturn 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 `searchValue`. If no such entry\n\t * exists, this method returns the next lower 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 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"]}
|
|
1
|
+
{"version":3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AK,SAAS,EAAE;gBACvB,MAAM,CACL,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAC1F,+BAA+B,CAC/B,CAAC;aACF;YACD,IAAI,GAAG,EAAE,CAAC;SACV;IACF,CAAC;CACD","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, fail } from '../Common';\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(other: AppendOnlySortedMap<K, V>, compareValues: (a: V, b: V) => boolean): 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(this.comparator(kv[0], prev[0]) > 0, 'Keys in map must be sorted.');\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 append(key: K, value: V): void {\n\t\tif (\n\t\t\tthis.elements.length !== 0 &&\n\t\t\tthis.valueComparator(this.extractSearchValue(value), this.extractSearchValue(this.maxValue() as V)) <= 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\tpublic getByValue(value: S): K | undefined {\n\t\tconst index = AppendOnlySortedMap.keyIndexOf(this.elements, value, this.compareValues);\n\t\treturn 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 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(this.extractSearchValue(kv[1]), this.extractSearchValue(prev[1])) > 0,\n\t\t\t\t\t'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"]}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { LocalCompressedId, FinalCompressedId, SessionSpaceCompressedId, StableId, OpSpaceCompressedId, SessionId, CompressedId } from '../Identifiers';
|
|
6
|
-
import type {
|
|
5
|
+
import { LocalCompressedId, FinalCompressedId, SessionSpaceCompressedId, StableId, OpSpaceCompressedId, SessionId, CompressedId, AttributionId } from '../Identifiers';
|
|
6
|
+
import type { IdCreationRange, SerializedIdCompressorWithNoSession, SerializedIdCompressorWithOngoingSession, VersionedSerializedIdCompressor } from './persisted-types';
|
|
7
7
|
/**
|
|
8
8
|
* Roughly equates to a minimum of 1M sessions before we start allocating 64 bit IDs.
|
|
9
9
|
* This value must *NOT* change without careful consideration to compatibility.
|
|
@@ -125,7 +125,11 @@ export declare class IdCompressor {
|
|
|
125
125
|
*/
|
|
126
126
|
set clusterCapacity(value: number);
|
|
127
127
|
/**
|
|
128
|
-
*
|
|
128
|
+
* The UUID used for attribution of identities created by this compressor
|
|
129
|
+
*/
|
|
130
|
+
get attributionId(): AttributionId;
|
|
131
|
+
/**
|
|
132
|
+
* Session ID -\> data about the session's current cluster.
|
|
129
133
|
* Sessions are mutable, and thus should only be created via `createSession`.
|
|
130
134
|
*/
|
|
131
135
|
private readonly sessions;
|
|
@@ -133,10 +137,6 @@ export declare class IdCompressor {
|
|
|
133
137
|
* The `IdCompressor`'s current local session.
|
|
134
138
|
*/
|
|
135
139
|
private readonly localSession;
|
|
136
|
-
/**
|
|
137
|
-
* Boolean to track whether attribution has been sent with an ID range yet. Prevents unnecessary bloat of ranges.
|
|
138
|
-
*/
|
|
139
|
-
private sentAttributionInfo;
|
|
140
140
|
/**
|
|
141
141
|
* The base final ID of the next cluster to be created.
|
|
142
142
|
*/
|
|
@@ -157,7 +157,7 @@ export declare class IdCompressor {
|
|
|
157
157
|
private readonly localOverrides;
|
|
158
158
|
/**
|
|
159
159
|
* Maps local IDs to the cluster they belong to (if any). This can be used to efficiently convert a local ID to a
|
|
160
|
-
* final ID by finding an entry
|
|
160
|
+
* final ID by finding an entry \<= a given local ID (to find the cluster it is associated with) and checking
|
|
161
161
|
* it against `numFinalizedLocalIds`.
|
|
162
162
|
*/
|
|
163
163
|
private readonly localIdToCluster;
|
|
@@ -180,25 +180,27 @@ export declare class IdCompressor {
|
|
|
180
180
|
*/
|
|
181
181
|
private static overrideComparator;
|
|
182
182
|
/**
|
|
183
|
-
* @param localSessionId the `IdCompressor`'s current local session ID.
|
|
184
|
-
* @param reservedIdCount the number of IDs that will be known by this compressor without relying on consensus.
|
|
185
|
-
* for a given session must be constant for any compressor that contains IDs from that session
|
|
186
|
-
* compressor must have the same reservedIdCount forever). Compressors with different
|
|
187
|
-
* IDs.
|
|
188
|
-
* @param
|
|
183
|
+
* @param localSessionId - the `IdCompressor`'s current local session ID.
|
|
184
|
+
* @param reservedIdCount - the number of IDs that will be known by this compressor without relying on consensus.
|
|
185
|
+
* The reserved ID count for a given session must be constant for any compressor that contains IDs from that session
|
|
186
|
+
* (i.e. any DDS that uses the ID compressor must have the same reservedIdCount forever). Compressors with different
|
|
187
|
+
* reserved ID counts will fail to synchronize their IDs.
|
|
188
|
+
* @param attributionId - a UUID that identifies the user of this instance of the compressor. IDs created by this
|
|
189
|
+
* compressor will be associated with this UUID and can be queried later via `attributeID`. If no UUID is provided,
|
|
190
|
+
* this compressor will generate its own. An `AttributionId` is an `UuidString` which may be validated via
|
|
191
|
+
* {@link isUuidString} or generated via {@link generateStableId}.
|
|
189
192
|
*/
|
|
190
|
-
constructor(localSessionId: SessionId, reservedIdCount: number,
|
|
193
|
+
constructor(localSessionId: SessionId, reservedIdCount: number, attributionId?: AttributionId);
|
|
191
194
|
/**
|
|
192
195
|
* Creates a session object for the supplied ID.
|
|
193
196
|
* Must only be called once per ID.
|
|
194
|
-
* @param sessionId the ID for the session
|
|
197
|
+
* @param sessionId - the ID for the session
|
|
195
198
|
* @returns the session object for the supplied ID
|
|
196
199
|
*/
|
|
197
200
|
private createSession;
|
|
198
|
-
private tryGetSession;
|
|
199
201
|
/**
|
|
200
202
|
* Return the nth reserved ID.
|
|
201
|
-
* @param index the index of the ID to return
|
|
203
|
+
* @param index - the index of the ID to return
|
|
202
204
|
*/
|
|
203
205
|
getReservedId(index: number): SessionSpaceCompressedId & FinalCompressedId;
|
|
204
206
|
/**
|
|
@@ -206,9 +208,9 @@ export declare class IdCompressor {
|
|
|
206
208
|
*/
|
|
207
209
|
getAllIdsFromLocalSession(): IterableIterator<SessionSpaceCompressedId>;
|
|
208
210
|
/**
|
|
209
|
-
* Returns the attribution
|
|
211
|
+
* Returns the attribution ID associated with the compressor that created the ID
|
|
210
212
|
*/
|
|
211
|
-
attributeId(id: SessionSpaceCompressedId):
|
|
213
|
+
attributeId(id: SessionSpaceCompressedId): AttributionId;
|
|
212
214
|
/**
|
|
213
215
|
* Provides the session-space IDs corresponding to a range of IDs.
|
|
214
216
|
* See `IdRange` for more details.
|
|
@@ -223,7 +225,7 @@ export declare class IdCompressor {
|
|
|
223
225
|
takeNextCreationRange(): IdCreationRange;
|
|
224
226
|
/**
|
|
225
227
|
* Finalizes the supplied range of IDs (which may be from either a remote or local session).
|
|
226
|
-
* @param range the range of session-local IDs to finalize.
|
|
228
|
+
* @param range - the range of session-local IDs to finalize.
|
|
227
229
|
*/
|
|
228
230
|
finalizeCreationRange(range: IdCreationRange): void;
|
|
229
231
|
private checkClusterForCollision;
|
|
@@ -238,7 +240,7 @@ export declare class IdCompressor {
|
|
|
238
240
|
private getExistingIdsForNewOverride;
|
|
239
241
|
/**
|
|
240
242
|
* Check if `a` might be within `range` of `b`, where both are treated as hex numbers.
|
|
241
|
-
* @param range an integer
|
|
243
|
+
* @param range - an integer
|
|
242
244
|
*/
|
|
243
245
|
private static uuidsMightCollide;
|
|
244
246
|
/**
|
|
@@ -248,7 +250,7 @@ export declare class IdCompressor {
|
|
|
248
250
|
/**
|
|
249
251
|
* Generates a new compressed ID or returns an existing one.
|
|
250
252
|
* This should ONLY be called to generate IDs for local operations.
|
|
251
|
-
* @param override Specifies a specific string to be associated with the returned compressed ID.
|
|
253
|
+
* @param override - Specifies a specific string to be associated with the returned compressed ID.
|
|
252
254
|
* Performance note: assigning override strings incurs a performance overhead.
|
|
253
255
|
* @returns an existing ID if one already exists for `override`, and a new local ID otherwise. The returned ID is in session space.
|
|
254
256
|
*/
|
|
@@ -256,32 +258,32 @@ export declare class IdCompressor {
|
|
|
256
258
|
/**
|
|
257
259
|
* Generates a range of compressed IDs.
|
|
258
260
|
* This should ONLY be called to generate IDs for local operations.
|
|
259
|
-
* @param count the number of IDs to generate, must be
|
|
261
|
+
* @param count - the number of IDs to generate, must be \> 0.
|
|
260
262
|
* @returns a persistable descriptor of the ID range.
|
|
261
263
|
*/
|
|
262
264
|
generateCompressedIdRange(count: number): IdRangeDescriptor<LocalCompressedId>;
|
|
263
265
|
private generateNextLocalId;
|
|
264
266
|
/**
|
|
265
267
|
* Decompresses a previously compressed ID into a UUID or override string.
|
|
266
|
-
* @param id the compressed ID to be decompressed.
|
|
268
|
+
* @param id - the compressed ID to be decompressed.
|
|
267
269
|
* @returns the UUID or override string associated with the compressed ID. Fails if the ID was not generated by this compressor.
|
|
268
270
|
*/
|
|
269
271
|
decompress(id: SessionSpaceCompressedId | FinalCompressedId): StableId | string;
|
|
270
272
|
/**
|
|
271
273
|
* Attempts to decompress a previously compressed ID into a UUID or override string.
|
|
272
|
-
* @param id the compressed ID to be decompressed.
|
|
274
|
+
* @param id - the compressed ID to be decompressed.
|
|
273
275
|
* @returns the UUID or override string associated with the compressed ID, or undefined if the ID was not generated by this compressor.
|
|
274
276
|
*/
|
|
275
277
|
tryDecompress(id: SessionSpaceCompressedId | FinalCompressedId): StableId | string | undefined;
|
|
276
278
|
/**
|
|
277
279
|
* Recompresses a decompressed ID, which could be a UUID or an override string.
|
|
278
|
-
* @param uncompressed the UUID or override string to recompress.
|
|
280
|
+
* @param uncompressed - the UUID or override string to recompress.
|
|
279
281
|
* @returns the `CompressedId` associated with `uncompressed`. Fails if it has not been previously compressed by this compressor.
|
|
280
282
|
*/
|
|
281
283
|
recompress(uncompressed: string): SessionSpaceCompressedId;
|
|
282
284
|
/**
|
|
283
285
|
* Attempts to recompresses a decompressed ID, which could be a UUID or an override string.
|
|
284
|
-
* @param uncompressed the UUID or override string to recompress,
|
|
286
|
+
* @param uncompressed - the UUID or override string to recompress,
|
|
285
287
|
* @returns the `CompressedId` associated with `uncompressed` or undefined if it has not been previously compressed by this compressor.
|
|
286
288
|
*/
|
|
287
289
|
tryRecompress(uncompressed: string): SessionSpaceCompressedId | undefined;
|
|
@@ -292,15 +294,15 @@ export declare class IdCompressor {
|
|
|
292
294
|
private recompressInternal;
|
|
293
295
|
/**
|
|
294
296
|
* Normalizes a session space ID into op space.
|
|
295
|
-
* @param id the local ID to normalize.
|
|
297
|
+
* @param id - the local ID to normalize.
|
|
296
298
|
* @returns the ID in op space.
|
|
297
299
|
*/
|
|
298
300
|
normalizeToOpSpace(id: SessionSpaceCompressedId): OpSpaceCompressedId;
|
|
299
301
|
/**
|
|
300
302
|
* Normalizes an ID into session space.
|
|
301
|
-
* @param id the ID to normalize. If it is a local ID, it is assumed to have been created by the session corresponding
|
|
303
|
+
* @param id - the ID to normalize. If it is a local ID, it is assumed to have been created by the session corresponding
|
|
302
304
|
* to `sessionId`.
|
|
303
|
-
* @param originSessionId the session from which `id` originated
|
|
305
|
+
* @param originSessionId - the session from which `id` originated
|
|
304
306
|
* @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
|
|
305
307
|
* 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
|
|
306
308
|
* range that contained it from the server.
|
|
@@ -308,7 +310,7 @@ export declare class IdCompressor {
|
|
|
308
310
|
normalizeToSessionSpace(id: OpSpaceCompressedId, originSessionId: SessionId): SessionSpaceCompressedId;
|
|
309
311
|
/**
|
|
310
312
|
* Normalizes a final ID into session space.
|
|
311
|
-
* @param id the final ID to normalize.
|
|
313
|
+
* @param id - the final ID to normalize.
|
|
312
314
|
* @returns the session-space ID corresponding to `id`.
|
|
313
315
|
*/
|
|
314
316
|
normalizeToSessionSpace(id: FinalCompressedId): SessionSpaceCompressedId;
|
|
@@ -336,8 +338,8 @@ export declare class IdCompressor {
|
|
|
336
338
|
private getLocalIdForStableId;
|
|
337
339
|
private getClusterForFinalId;
|
|
338
340
|
/**
|
|
339
|
-
* @returns if `other` is equal to this `IdCompressor`. The equality check includes local session state.
|
|
340
|
-
*
|
|
341
|
+
* @returns if `other` is equal to this `IdCompressor`. The equality check includes local session state only if specified.
|
|
342
|
+
* \@testOnly
|
|
341
343
|
*/
|
|
342
344
|
equals(other: IdCompressor, compareLocalState: boolean): boolean;
|
|
343
345
|
private static sessionDataEqual;
|
|
@@ -362,22 +364,21 @@ export declare class IdCompressor {
|
|
|
362
364
|
*/
|
|
363
365
|
static deserialize(serialized: SerializedIdCompressorWithOngoingSession): IdCompressor;
|
|
364
366
|
/**
|
|
365
|
-
* Deserialize
|
|
366
|
-
*
|
|
367
|
-
* @param
|
|
368
|
-
* @param
|
|
369
|
-
* @param attributionInfo information used by other clients to attribute IDs made by this client
|
|
367
|
+
* Deserialize a serialized IdCompressor with a new session.
|
|
368
|
+
* @param serialized - the serialized compressor state
|
|
369
|
+
* @param newSessionId - the session ID for the new compressor.
|
|
370
|
+
* @param attributionId - information used by other clients to attribute IDs made by this client
|
|
370
371
|
*/
|
|
371
|
-
static deserialize(serialized: SerializedIdCompressorWithNoSession, newSessionId: SessionId,
|
|
372
|
+
static deserialize(serialized: SerializedIdCompressorWithNoSession, newSessionId: SessionId, attributionId?: AttributionId): IdCompressor;
|
|
372
373
|
/**
|
|
373
374
|
* Converts the given serialized compressor to the current version.
|
|
374
|
-
* @param serializedCompressor the serialized compressor to convert. Must not have been serialized with an ongoing session.
|
|
375
|
+
* @param serializedCompressor - the serialized compressor to convert. Must not have been serialized with an ongoing session.
|
|
375
376
|
* @returns a serialized compressor with no ongoing session.
|
|
376
377
|
*/
|
|
377
378
|
static convertToCurrentVersion(serializedCompressor: VersionedSerializedIdCompressor, hasSession: false): SerializedIdCompressorWithNoSession;
|
|
378
379
|
/**
|
|
379
380
|
* Converts the given serialized compressor to the current version.
|
|
380
|
-
* @param serializedCompressor the serialized compressor to convert. Must have been serialized with an ongoing session.
|
|
381
|
+
* @param serializedCompressor - the serialized compressor to convert. Must have been serialized with an ongoing session.
|
|
381
382
|
* @returns a serialized compressor with the same ongoing session.
|
|
382
383
|
*/
|
|
383
384
|
static convertToCurrentVersion(serializedCompressor: VersionedSerializedIdCompressor, hasSession: true): SerializedIdCompressorWithOngoingSession;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdCompressor.d.ts","sourceRoot":"","sources":["../../src/id-compressor/IdCompressor.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"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