Class AnonymousSeed

java.lang.Object
liquibase.analytics.AnonymousSeed

public class AnonymousSeed extends Object
This class generates an anonymous seed based on various system properties such as the username, MAC addresses, and machine ID. It uses this data to generate a UUID that can serve as an identifier.
  • Constructor Details

    • AnonymousSeed

      public AnonymousSeed()
      Constructs an AnonymousSeed object. It attempts to retrieve the current username, the machine ID (on Linux systems), and the MAC addresses of network interfaces. If the machine ID is available, it is preferred over MAC addresses.
  • Method Details

    • generateId

      public String generateId()
      Generates a UUID based on the collected system data (username, MAC addresses, machine ID). If neither the machine ID nor MAC addresses are available, a random UUID is generated instead.
      Returns:
      a UUID generated from the system data, or a random UUID if insufficient data is available