Class MutexLabellingUtils

java.lang.Object
org.tasktide.mutex.utils.MutexLabellingUtils

public class MutexLabellingUtils extends Object
Utility for Mutex labelling
  • Constructor Details

    • MutexLabellingUtils

      public MutexLabellingUtils()
  • Method Details

    • getInstanceId

      public static String getInstanceId()
      Get instance Id
      Returns:
      String
    • getNodeId

      public static String getNodeId()
      Get configured node Id
      Returns:
      String
    • configure

      public static void configure()
      Configure utility
    • getHostIp

      public static InetAddress getHostIp()
      Get host IP address
      Returns:
      InetAddress
    • formatIpAddr

      public static String formatIpAddr(InetAddress addr)
      Represent InetAddress with underscores instead of dots
      Parameters:
      addr -
      Returns:
      String
    • getNodeProcId

      public static String getNodeProcId()
      Concatenate Node and IP Address
      Returns:
      String
    • getCurrentTimeStamp

      public static long getCurrentTimeStamp()
      Get epoch time
      Returns:
      long
    • getMutexFileName

      public static String getMutexFileName()
      Get the file name for new lock file under node-instance, to be appended onto directory path
      Returns:
      String
    • isConfigured

      public static boolean isConfigured()
      Display whether utility is configured
      Returns:
      boolean