public class NodeUtils
extends java.lang.Object
Constructor and Description |
---|
NodeUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
createDirs(java.lang.String homeDir,
java.lang.String id)
Creates directories, below
homeDir that are needed by
any given node. |
static boolean |
createDirs(java.lang.String homeDir,
java.lang.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. |
Logger |
getLogger() |
static boolean |
removeDirs(java.lang.String homeDir,
java.lang.String id) |
static boolean |
removeDirs(java.lang.String homeDir,
java.lang.String id,
Logger loggerRef) |
void |
setLogger(Logger loggerRef) |
public static boolean createDirs(java.lang.String homeDir, java.lang.String id)
homeDir
that are needed by
any given node.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.true
if creation of all directories
was successful.public static boolean createDirs(java.lang.String homeDir, java.lang.String id, Logger loggerRef)
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.loggerRef
- Reference to the logger to be used for
error messages.public static boolean removeDirs(java.lang.String homeDir, java.lang.String id)
public static boolean removeDirs(java.lang.String homeDir, java.lang.String id, Logger loggerRef)
public final Logger getLogger()
public final void setLogger(Logger loggerRef)