Class NodeUtils

java.lang.Object
com.nt.udc.osanode.NodeUtils

public class NodeUtils extends Object
  • Constructor Details

    • NodeUtils

      public NodeUtils()
  • Method Details

    • createDirs

      public static boolean createDirs(String homeDir, String id)
      Creates directories, below homeDir that are needed by any given node.
      Parameters:
      homeDir - Directory where sub-directories should be added
      id - String representation of the process id that will be using the directories, such as a node ID.
      Returns:
      true if creation of all directories was successful.
    • createDirs

      public static boolean createDirs(String homeDir, String id, Logger loggerRef)
      Sets logger to the given Logger object and calls createDirs( String, String ) which will cause a message to be written to the logger if any attempts to create the directories are unsuccessful.
      Parameters:
      loggerRef - Reference to the logger to be used for error messages.
    • removeDirs

      public static boolean removeDirs(String homeDir, String id)
    • backUpDirs

      public static boolean backUpDirs(String homeDir, String id)
    • removeDirs

      public static boolean removeDirs(String homeDir, String id, Logger loggerRef)
    • removeLoggingConfig

      public static boolean removeLoggingConfig(String id, Logger loggerRef)
    • backUpDirs

      public static boolean backUpDirs(String homeDir, String id, Logger loggerRef)
    • getLogger

      public final Logger getLogger()
    • setLogger

      public final void setLogger(Logger loggerRef)