public class Generators extends Object
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
Generators() |
Modifier and Type | Method and Description |
---|---|
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). |
protected static UUIDTimer _sharedTimer
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)
FileBasedTimestampSynchronizer
public static TimeBasedGenerator timeBasedGenerator(EthernetAddress ethernetAddress, UUIDTimer timer)
UUIDTimer
instance
(which includes embedded synchronizer that defines synchronization behavior).Copyright © 2013 FasterXML.com. All rights reserved.