|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.fasterxml.uuid.Generators
public class Generators
Root factory class for constructing UUID generators.
Field Summary | |
---|---|
protected static UUIDTimer |
_sharedTimer
If no explicit timer (and synchronizer it implicitly uses) is specified, we will create and use a single lazily-constructed timer, which uses in-JVM synchronization but no external file-based syncing. |
Constructor Summary | |
---|---|
Generators()
|
Method Summary | |
---|---|
static NameBasedGenerator |
nameBasedGenerator()
Factory method for constructing UUID generator that uses specified random number generator for constructing UUIDs according to standard method number 5, but without using a namespace. |
static NameBasedGenerator |
nameBasedGenerator(UUID namespace)
Factory method for constructing UUID generator that uses specified random number generator for constructing UUIDs according to standard method number 5, with specified namespace (or without one if null is specified). |
static NameBasedGenerator |
nameBasedGenerator(UUID namespace,
MessageDigest digester)
Factory method for constructing UUID generator that uses specified random number generator for constructing UUIDs according to standard method number 3 or 5, with specified namespace (or without one if null is specified), using specified digester. |
static RandomBasedGenerator |
randomBasedGenerator()
Factory method for constructing UUID generator that uses default (shared) random number generator for constructing UUIDs according to standard method number 4. |
static RandomBasedGenerator |
randomBasedGenerator(Random rnd)
Factory method for constructing UUID generator that uses specified random number generator for constructing UUIDs according to standard method number 4. |
static TimeBasedGenerator |
timeBasedGenerator()
Factory method for constructing UUID generator that generates UUID using variant 1 (time+location based). |
static TimeBasedGenerator |
timeBasedGenerator(EthernetAddress ethernetAddress)
Factory method for constructing UUID generator that generates UUID using variant 1 (time+location based), using specified Ethernet address as the location part of UUID. |
static TimeBasedGenerator |
timeBasedGenerator(EthernetAddress ethernetAddress,
TimestampSynchronizer sync)
Factory method for constructing UUID generator that generates UUID using variant 1 (time+location based), using specified Ethernet address as the location part of UUID, and specified synchronizer (which may add additional restrictions to guarantee system-wide uniqueness). |
static TimeBasedGenerator |
timeBasedGenerator(EthernetAddress ethernetAddress,
UUIDTimer timer)
Factory method for constructing UUID generator that generates UUID using variant 1 (time+location based), using specified Ethernet address as the location part of UUID, and specified UUIDTimer instance
(which includes embedded synchronizer that defines synchronization behavior). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static UUIDTimer _sharedTimer
Constructor Detail |
---|
public Generators()
Method Detail |
---|
public static RandomBasedGenerator randomBasedGenerator()
public static RandomBasedGenerator randomBasedGenerator(Random rnd)
public static NameBasedGenerator nameBasedGenerator()
public static NameBasedGenerator nameBasedGenerator(UUID namespace)
namespace
- UUID that represents namespace to use; see
NameBasedGenerator
for 'standard' namespaces specified by
UUID specspublic static NameBasedGenerator nameBasedGenerator(UUID namespace, MessageDigest digester)
namespace
- UUID that represents namespace to use; see
NameBasedGenerator
for 'standard' namespaces specified by
UUID specsdigester
- Digester to use; should be a MD5 or SHA-1 digester.public static TimeBasedGenerator timeBasedGenerator()
EthernetAddress.fromInterface()
which will use one of available
MAC (Ethernet) addresses available.
public static TimeBasedGenerator timeBasedGenerator(EthernetAddress ethernetAddress)
public static TimeBasedGenerator timeBasedGenerator(EthernetAddress ethernetAddress, TimestampSynchronizer sync)
ethernetAddress
- (optional) MAC address to use; if null, a transient
random address is generated.FileBasedTimestampSynchronizer
public static TimeBasedGenerator timeBasedGenerator(EthernetAddress ethernetAddress, UUIDTimer timer)
UUIDTimer
instance
(which includes embedded synchronizer that defines synchronization behavior).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |