Package com.nt.udc.osanode
Class NodeUtils
java.lang.Object
com.nt.udc.osanode.NodeUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanbackUpDirs(String homeDir, String id) static booleanbackUpDirs(String homeDir, String id, Logger loggerRef) static booleancreateDirs(String homeDir, String id) Creates directories, belowhomeDirthat are needed by any given node.static booleancreateDirs(String homeDir, String id, Logger loggerRef) Setsloggerto the given Logger object and callscreateDirs( String, String )which will cause a message to be written to the logger if any attempts to create the directories are unsuccessful.final Loggerstatic booleanremoveDirs(String homeDir, String id) static booleanremoveDirs(String homeDir, String id, Logger loggerRef) static booleanremoveLoggingConfig(String id, Logger loggerRef) final void
-
Constructor Details
-
NodeUtils
public NodeUtils()
-
-
Method Details
-
createDirs
Creates directories, belowhomeDirthat are needed by any given node.- Parameters:
homeDir- Directory where sub-directories should be addedid- String representation of the process id that will be using the directories, such as a node ID.- Returns:
trueif creation of all directories was successful.
-
createDirs
Setsloggerto the given Logger object and callscreateDirs( 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
-
backUpDirs
-
removeDirs
-
removeLoggingConfig
-
backUpDirs
-
getLogger
-
setLogger
-