TransientIdSequence Class
Generates unique Id64String values in sequence, which are guaranteed not to conflict with Ids associated with persistent elements or models. This is useful for associating stable, non-persistent identifiers with things like Decorators. A TransientIdSequence can generate a maximum of (2^40)-2 unique Ids.
Methods
Name | Description | |
---|---|---|
constructor(initialLocalId: number0): TransientIdSequence | Constructor. | |
fork(): TransientIdSequenceProps | Obtain the JSON representation of a new sequence that diverges from this sequence, with its initialLocalId set to this sequence's currentLocalId. | |
getNext(): string | Generate and return the next transient Id64String in the sequence. | |
merge(source: TransientIdSequenceProps): (sourceLocalId: number) => number | Integrate the Ids generated by a fork of this sequence. | |
peekNext(): string | Preview the transient Id64String that will be returned by the next call to getNext. | |
toJSON(): TransientIdSequenceProps | Convert this sequence to its JSON representation. | |
fromJSON(props: TransientIdSequenceProps): TransientIdSequence Static | Create a sequence from its JSON representation. |
Properties
Name | Type | Description | |
---|---|---|---|
currentLocalId Accessor ReadOnly | number | The maximum local Id generated by the sequence thus far. | |
initialLocalId Readonly | number | The starting local Id provided to the constructor. | |
next Accessor ReadOnly | string | Generate and return the next transient Id64String in the sequence. |
Defined in
- core/bentley/src/Id.ts Line 717
Last Updated: 17 December, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.