Private
constructorStatic
generateCalls Scru64Generator.generate of the global generator.
Static
generateCalls Scru64Generator.generateOrAwait of the global generator.
Static
generateCalls Scru64Generator.generateOrSleep of the global generator.
Static
getCalls Scru64Generator.getNodeId of the global generator.
Static
getCalls Scru64Generator.getNodeIdSize of the global generator.
Static
getCalls Scru64Generator.getNodePrev of the global generator.
Static
getCalls Scru64Generator.getNodeSpec of the global generator.
Static
initializeInitializes the global generator, if not initialized, with the node spec passed.
This method tries to configure the global generator with the argument only when the global generator is not yet initialized. Otherwise, it preserves the existing configuration.
true
if this method configures the global generator or false
if it preserves the existing configuration.
SyntaxError
or RangeError
according to the semantics of
new Scru64Generator(nodeSpec) if the
argument represents an invalid node spec.
The gateway object that forwards supported method calls to the process-wide global generator.
By default, the global generator reads the node configuration from the
SCRU64_NODE_SPEC
global variable when a generator method is first called, and it throws an error if it fails to do so. The node configuration is encoded in a node spec string consisting ofnodeId
andnodeIdSize
integers separated by a slash (e.g., "42/8", "0xb00/12"; see NodeSpec for details). You can configure the global generator differently by calling GlobalGenerator.initialize before the default initializer is triggered.