Package com.gigaspaces.lrmi
Class UIDGen
java.lang.Object
com.gigaspaces.lrmi.UIDGen
A
UIDGen represents an identifier that is unique over time with respect to the host
it is generated on, or one of 216 "well-known" identifiers.
The nextId() can be used to generate an identifier that is unique over time with
respect to the host it is generated on.
A UIDGen instance contains three primitive values:
unique, anintthat uniquely identifies the VM that thisUIDwas generated in, with respect to its host and at the time represented by thetimevalue (an example implementation of theuniquevalue would be a process identifier), or zero for a well-knownUIDtime, alongequal to a time (as returned bySystem.nanoTime()) at which the VM that thisUIDwas generated in was alive, or zero for a well-knownUIDcount, ashortto distinguishUIDs generated in the same VM with the sametimevalue
- Since:
- 4.0
- Author:
- Igor Goldenberg
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longnextId()Generates alongthat is unique over time with respect to the host that it was generated on.
-
Constructor Details
-
UIDGen
public UIDGen()
-
-
Method Details
-
nextId
public static long nextId()Generates alongthat is unique over time with respect to the host that it was generated on.
-