|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--one.world.util.SystemUtilities
Implementation of system utilities. This class provides
functionality available through java.lang.System or
java.lang.Runtime to code running in a protection
domain that limits access to the Java platform libraries. It also
provides information about the local node.
| Method Summary | |
static int |
activeThreads()
Get the current number of threads. |
static void |
arraycopy(Object src,
int src_position,
Object dst,
int dst_position,
int length)
Copy an array. |
static long |
currentTimeMillis()
Get the current time. |
static void |
debug(String msg)
Print the specified debug message to the console. |
static void |
debug(Throwable x)
Print the specified throwable to the console. |
static Process |
exec(String command)
Execute the specified command in a separate process. |
static String |
format(long time)
Format the specified time. |
static long |
freeMemory()
Get the current amount of free memory. |
static Properties |
getProperties()
Get the current system propeties. |
static String |
getProperty(String key)
Get the system property. |
static String |
getProperty(String key,
String def)
Get the system property. |
static int |
identityHashCode(Object o)
Get the identity hashcode. |
static String |
ipAddress()
Get the IP address for this node. |
static boolean |
isLocalHost(String host)
Determine whether the specified host is the local host. |
static byte[] |
rawIpAddress()
Get the IP address for this node as an array of bytes. |
static void |
sleep(long duration)
Sleep for the specified time. |
static void |
sleep(long duration,
int nanos)
Sleep for the specified time. |
static long |
totalMemory()
Get the total amount of memory. |
static long |
uptime()
Get the current uptime. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static void arraycopy(Object src,
int src_position,
Object dst,
int dst_position,
int length)
java.lang.System.public static int identityHashCode(Object o)
java.lang.System.public static Properties getProperties()
java.lang.System.public static String getProperty(String key)
java.lang.System.
public static String getProperty(String key,
String def)
java.lang.System.public static long currentTimeMillis()
java.lang.System.public static long uptime()
public static void sleep(long duration)
throws InterruptedException
Thread.sleep(long) with the specified duration.duration - The duration in milliseconds.InterruptedException - Signals that the sleep was interrupted.
public static void sleep(long duration,
int nanos)
throws InterruptedException
Thread.sleep(long,int) with the specified duration.duration - The duration in milliseconds.nanos - The additional nanoseconds to sleep.InterruptedException - Signals that the sleep was interrupted.public static String format(long time)
time - The time to format.public static long freeMemory()
java.lang.Runtime.public static long totalMemory()
java.lang.Runtime.public static int activeThreads()
public static String ipAddress()
null if
this node has no IP address.public static byte[] rawIpAddress()
null if this node has no IP address.public static boolean isLocalHost(String host)
localhost" is always treated as this host.host - The host to test.true if the specified host
is the local host.
public static Process exec(String command)
throws IOException
java.lang.Runtime.
This method is provided for legacy code that requires access
to outside processes. Note that such processes execute outside
one.world and cannot be check-pointed or
migrated. Furthermore, to use this method, a node's security
policy has to be configured so that the calling code as well as
one.world's core code have the appropriate
FilePermission.
public static void debug(String msg)
msg - The debug message to print to the console.public static void debug(Throwable x)
x - The throwable to print to the console.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||