Package com.nt.udc.osanode
Class NodeUtils
java.lang.Object
com.nt.udc.osanode.NodeUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
backUpDirs
(String homeDir, String id) static boolean
backUpDirs
(String homeDir, String id, Logger loggerRef) static boolean
createDirs
(String homeDir, String id) Creates directories, belowhomeDir
that are needed by any given node.static boolean
createDirs
(String homeDir, String id, Logger loggerRef) Setslogger
to 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 Logger
static boolean
removeDirs
(String homeDir, String id) static boolean
removeDirs
(String homeDir, String id, Logger loggerRef) static boolean
removeLoggingConfig
(String id, Logger loggerRef) final void
-
Constructor Details
-
NodeUtils
public NodeUtils()
-
-
Method Details
-
createDirs
Creates directories, belowhomeDir
that 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:
true
if creation of all directories was successful.
-
createDirs
Setslogger
to 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
-