GlobalIdGenerator

object GlobalIdGenerator : CosIdGenerator, Decorator<CosIdGenerator>

Global ID generator that provides unique identifier generation across the application.

This object acts as a singleton wrapper around a CosIdGenerator, loading the actual generator lazily using GlobalIdGeneratorFactory implementations discovered via ServiceLoader. It implements Decorator to delegate all operations to the underlying generator.

The generator is initialized on first access, and if no factory can provide a generator, a NotInitializedGlobalIdGeneratorError is thrown.

See also

Properties

Link copied to clipboard
open override val delegate: CosIdGenerator

The underlying CosIdGenerator that handles the actual ID generation.

Link copied to clipboard
open override val lastTimestamp: Long
Link copied to clipboard
open override val machineId: Int
Link copied to clipboard
open override val stateParser: CosIdIdStateParser

Functions

Link copied to clipboard
open fun generate(): Long
Link copied to clipboard
open override fun generateAsState(): CosIdState
Link copied to clipboard
@Nonnull
open fun generateAsString(): String?
Link copied to clipboard
open override fun getLastTimestamp(): Long
Link copied to clipboard
open override fun getMachineId(): Int
Link copied to clipboard
open override fun getStateParser(): CosIdIdStateParser
Link copied to clipboard
@Nonnull
open fun idConverter(): IdConverter?
Link copied to clipboard
open fun stat(): IdGeneratorStat?