- All Implemented Interfaces:
NodeIdentifierStrategy
public class HashNodeIdentifierStrategy
extends Object
implements NodeIdentifierStrategy
Strategy that calculates a node identifier based on system data like:
operating system, java virtual machine, network details, system resources,
locale and timezone.
The resulting node identifier is as unique and mutable as the host machine
data.
Read: https://en.wikipedia.org/wiki/Device_fingerprint
### RFC-4122 - 4.1.6. Node
For systems with no IEEE address, a randomly or pseudo-randomly generated
value may be used; see Section 4.5. The multicast bit must be set in such
addresses, in order that they will never conflict with addresses obtained
from network cards.
### RFC-4122 - 4.5. Node IDs that Do Not Identify the Host
In addition, items such as the computer's name and the name of the operating
system, while not strictly speaking random, will help differentiate the
results from those obtained by other systems.
The exact algorithm to generate a node ID using these data is system
specific, because both the data available and the functions to obtain them
are often very system specific. A generic approach, however, is to accumulate
as many sources as possible into a buffer, use a message digest such as MD5
[4] or SHA-1 [8], take an arbitrary 6 bytes from the hash value, and set the
multicast bit as described above.