getNodeIdentifier
public long getNodeIdentifier()
Get a node identifier generated from system information.
It uses these information to generate the node identifier: host name, IP,
MAC, operating system and JVM. These information are concatenated and
passed to a message digest. It returns the last six bytes of the
resulting hash.
### RFC-4122 - 4.5. Node IDs that Do Not Identify the Host
(1) This section describes how to generate a version 1 UUID if an IEEE
802 address is not available, or its use is not desired.
(4) 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.
(5) 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.
- Specified by:
getNodeIdentifier in interface NodeIdentifierStrategy
- Returns:
- a node identifier