You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* GetMachineSpecificGenerator & GetThreadSpecificGenerator renamed to CreateMachineSpecificGenerator & CreateThreadSpecificGenerator respectively to better convey that each invocation creates a new instance.
* Explicitly check for negative generator-id's
A library that provides a decentralized, k-ordered id generation
17
17
</summary>
18
18
<releaseNotes>
19
-
* GetMachineSpecificGenerator() and GetThreadSpecificGenerator() didn't use the GeneratorIdBits as bitmask resulting in incorrect generator ID's
19
+
* Added config file support
20
+
* GetMachineSpecificGenerator & GetThreadSpecificGenerator renamed to CreateMachineSpecificGenerator & CreateThreadSpecificGenerator respectively to better convey that each invokation creates a new instance.
20
21
</releaseNotes>
21
22
<tags>scalable unique id generator distributed</tags>
Copy file name to clipboardexpand all lines: IdGenDocumentation/Content/Welcome.aml
+3-3
Original file line number
Diff line number
Diff line change
@@ -220,19 +220,19 @@
220
220
All properties are read-only to prevent changes once an <codeEntityReferencelinkText="IdGenerator">T:IdGen.IdGenerator</codeEntityReference> has been instantiated.
221
221
</para>
222
222
<para>
223
-
The <codeEntityReferencelinkText="IdGenerator">T:IdGen.IdGenerator</codeEntityReference> class provides two 'factory methods' to quickly create a <codeEntityReferencelinkText="machine-specific">M:IdGen.IdGenerator.GetMachineSpecificGenerator</codeEntityReference> (based on the hostname) or <codeEntityReferencelinkText="thread-specific">M:IdGen.IdGenerator.GetThreadSpecificGenerator</codeEntityReference> IdGenerator:
223
+
The <codeEntityReferencelinkText="IdGenerator">T:IdGen.IdGenerator</codeEntityReference> class provides two 'factory methods' to quickly create a <codeEntityReferencelinkText="machine-specific">M:IdGen.IdGenerator.CreateMachineSpecificGenerator</codeEntityReference> (based on the hostname) or <codeEntityReferencelinkText="thread-specific">M:IdGen.IdGenerator.CreateThreadSpecificGenerator</codeEntityReference> IdGenerator:
224
224
</para>
225
225
<codelanguage="cs">
226
226
<![CDATA[
227
-
var generator = IdGenerator.GetMachineSpecificGenerator();
227
+
var generator = IdGenerator.CreateMachineSpecificGenerator();
228
228
]]>
229
229
</code>
230
230
<para>
231
231
or:
232
232
</para>
233
233
<codelanguage="cs">
234
234
<![CDATA[
235
-
var generator = IdGenerator.GetThreadSpecificGenerator();
235
+
var generator = IdGenerator.CreateThreadSpecificGenerator();
<NamespaceSummaryItemname="IdGen.Configuration"isDocumented="True"><para>The IdGen.Configuration namespace contains the types that provide the programming model for handling configuration data.</para></NamespaceSummaryItem></NamespaceSummaries>
These methods (and their overloads that allow you to specify the epoch, `MaskConfig` and `TimeSource`) create an `IdGenerator` based on hostname or (managed) thread-id. However, it is recommended you explicitly set / configure a generator-id since these two methods could cause 'collisions' when machinenames' hashes result in the same id's or when thread-id's collide with thread-id's on other machines.
0 commit comments