IdGenerator
The IdGenerator generates identifiers according to the generator type, and are created by the IdGeneratorFactory. Generated identifiers are always unique across the cluster, and are persisted across Rhapsody restarts.
Method | Description |
---|---|
|
Retrieves the name of the identifier. |
|
Retrieves the identifier type. |
|
Generates and returns the next identifier for this generator. The generated identifier is guaranteed to be unique across the cluster, and will be persisted correctly across Rhapsody restarts. However, the generated identifiers will not necessarily be in numerical order - the ordering is determined by the generator type. Exceptions:
|
|
Retrieves the current value of this id generator without incrementing the value. This method is only provided for backwards compatibility for the JavaScript filter and its use is generally a bad idea. Instead, the nextId() method should be used. |
|
Resets the next allocated identifier to the specified value. Note that this is not safe when generating identifiers with multiple threads or nodes simultaneously, and its use should be avoided. Parameters:
Exceptions:
|
IdGeneratorFactory
The IdGeneratorFactory provides an id generation service. It allows multiple id generators of different types to be created, and is responsible for generating identifiers uniquely across the cluster, and persisting them across restarts of Rhapsody.
Method | Description |
---|---|
|
Creates an identifier generator with the specified type and name. If an id generator of the specified name and type already exists, then it is returned. Otherwise, a new ID generator (starting at 0) is created. |
|
Gets a set of identifier generator created by the identifier generator factor. |