|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
---|---|
State | The State interface. |
Class Summary | |
---|---|
InMemoryStateImpl | The InMemoryStateImpl is an implementation of the
State interface. |
Node | The Node class represents the data and accessors for a single
node identifier. |
ReadOnlyResourceStateImpl | The ReadOnlyResourceStateImpl is an implementation of the
State interface. |
ReadWriteFileStateImpl | The ReadWriteFileStateImpl is an implementation of the
State interface. |
StateHelper | StateHelper provides helper methods for the uuid state
implementations. |
This package contains persistent and non-persistent state implementations for data related to the generation of version 1 UUIDs. Not all containers allow I/O; however when generating version 1 UUIDs it is best to persist the node identifier (MAC address), clock sequence, and last timestamp generated combination to stable storage. This allows the generator to determine if the time has been set backwards so that a different clock sequence is used to reduce the likelihood of duplicate identifiers.
Three provided implementation are:
ReadOnlyResourceStateImpl
- loads one of the data points
(node id) using the Classloader's getSystemResource method. Useful for
containers that allow reading resources but that don't allow writing to file.
The clock sequence is always initialized to a random short.
ReadWriteFileStateImpl
- when possible a version one
generator should persist to stable storage. This implementation extends
ReadOnlyResourceStateImpl but also writes to the state configuration file.
InMemoryStateImpl
- all data points are strictly managed
in memory with no long-term storage. The node identifier is created from a
MD5 hash of System properties.
|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |