Class JvmProcessMacIds

java.lang.Object
io.clonecloudstore.common.standard.guid.JvmProcessMacIds

public final class JvmProcessMacIds extends Object
Internal class for Process Id, Mac Address and Jvm Id (PID + MacAddress)
  • Field Details

  • Method Details

    • getJvmPID

      public static int getJvmPID()
      Returns:
      The JVM PID as integer
    • getMac

      public static byte[] getMac()
      Returns:
      the Mac address as byte array
    • getMacPid

      public static byte[] getMacPid()
      Returns:
      the Mac and PID as byte array of size 6
    • setMac

      public static void setMac(byte[] mac)
      Up to the 8 first bytes will be used. If Null or less than 6 bytes, extra bytes will be randomly generated, up to 6 bytes.
      Parameters:
      mac - the MAC address in byte format (up to the 8 first bytes will be used)
    • getMacLong

      public static long getMacLong()
      Returns:
      the Mac address truncated to long
    • getMacInt

      public static int getMacInt()
      Returns:
      the Mac address truncated to integer
    • getJvmByteId

      public static byte getJvmByteId()
      Returns:
      The JVM Id (PID + MacAddress) truncated as 1 byte
    • getJvmIntegerId

      public static int getJvmIntegerId()
      Returns:
      The JVM Id (PID + MacAddress) truncated as integer
    • getJvmLongId

      public static long getJvmLongId()
      Returns:
      The JVM Id (PID + MacAddress) truncated as long