aleph
Class Aleph

java.lang.Object
  |
  +--aleph.Aleph

public final class Aleph
extends java.lang.Object

Provides basic utility methods.

Aleph defines the following system properties:

aleph.version
aleph version number
aleph.verbosity
controls level of detail messages
aleph.java_g
if true, use java_g instead of java
aleph.profile
if true, profile everything
aleph.label
user-friendly name for this PE
aleph.numPEs
size of this PE's group
aleph.index
index of this PE in its group
Other aleph.* properties may be defined by various packages

Any system property beginning with aleph is propagated to all PEs when they are started up.


Constructor Summary
Aleph()
           
 
Method Summary
static void assert(boolean assertion, java.lang.String label)
          Test an assertion, panic on failure.
This is your brain on bugs.
static void debug(java.lang.String msg)
          Send a line of output to debugging display.
static void debug(java.lang.String msg, boolean trace)
          Send a line of output to debugging stream.
static void error(java.lang.String message)
          display error message
static void error(java.lang.Throwable throwable)
          display error message
static void exit()
          Shut down the computation gracefully.
static void exit(int code)
          Shut down the computation gracefully.
static void exit(java.lang.String why)
          Shut down the computation gracefully.
static boolean getConfirm()
           
static int getIntProperty(java.lang.String key, int value)
          Return integer value of Aleph property.
static java.lang.String getLongBanner()
          Print out long banner listing managers, etc.
static boolean getPopup()
          Should warning and error messages be displayed in popup windows?
static int getPort()
          Get the port number used to find servers.
static java.util.Properties getProperties()
          Returns subset of system properties that match aleph.*.
static java.lang.String getProperty(java.lang.String key)
          Look up an Aleph property.
static java.lang.String getProperty(java.lang.String key, java.lang.String value)
          Look up an Aleph property.
static int getVerbosity()
          Read loquacity level.
static void inform(java.lang.String message)
          display informative message
static void inform(java.lang.Throwable throwable)
          display informative message
static boolean isBatch()
           
static void main(java.lang.String[] args)
          Main startup for Aleph.
static void panic(java.lang.String message)
          Panic shutdown.
static void panic(java.lang.Throwable e)
          Panic shutdown.
Print exception's detail message, stack trace, and dump interesting objects.
static void register(java.lang.String label, java.lang.Object object)
          Register interesting object to be part of panic-induced dump.
static void setDebugFile(java.lang.String title)
          reset name of debug file
static void setPopup(boolean value)
          Should warning and error messages be displayed in popup windows?
static void setPort(int v)
          Set the port number used to find servers.
static void setProperty(java.lang.String key, java.lang.String value)
          Define an Aleph property.
static void setVerbosity(int level)
          Adjust loquacity level.
static boolean verbosity(int level)
          Test loquacity level.
static void warning(java.lang.String message)
          display warning message
static void warning(java.lang.Throwable throwable)
          display warning message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Aleph

public Aleph()
Method Detail

getPort

public static int getPort()
Get the port number used to find servers.
Returns:
Value of port.

setPort

public static void setPort(int v)
Set the port number used to find servers.
Parameters:
v - Value to assign to port.

verbosity

public static boolean verbosity(int level)
Test loquacity level.
Parameters:
level - candidate verbosity level
Returns:
whether actual vebosity level is at least that high

setVerbosity

public static void setVerbosity(int level)
Adjust loquacity level. Set by aleph.Config.verbosity. Overridden by run-time flag -Daleph.verbosity=blah.

getVerbosity

public static int getVerbosity()
Read loquacity level. Applications should use verbosity() instead.

isBatch

public static boolean isBatch()
Returns:
whether to use interactive gui

getConfirm

public static boolean getConfirm()
Returns:
whether to ask for confirmation before shooting

warning

public static void warning(java.lang.String message)
display warning message
Parameters:
message - what to display

warning

public static void warning(java.lang.Throwable throwable)
display warning message
Parameters:
e - what to display

error

public static void error(java.lang.String message)
display error message
Parameters:
message - what to display

inform

public static void inform(java.lang.Throwable throwable)
display informative message
Parameters:
message - what to display

inform

public static void inform(java.lang.String message)
display informative message
Parameters:
message - what to display

error

public static void error(java.lang.Throwable throwable)
display error message
Parameters:
e - what to display

setProperty

public static void setProperty(java.lang.String key,
                               java.lang.String value)
Define an Aleph property.
Parameters:
key - bind to this key
bind - this value

getProperty

public static java.lang.String getProperty(java.lang.String key)
Look up an Aleph property.
Parameters:
key - return value bound to this key, or null

getProperty

public static java.lang.String getProperty(java.lang.String key,
                                           java.lang.String value)
Look up an Aleph property.
Parameters:
key - return value bound to this key
value - return this value if key is unbound

getIntProperty

public static int getIntProperty(java.lang.String key,
                                 int value)
Return integer value of Aleph property.
Parameters:
key - property name
value - default if property not found or not integer

getProperties

public static java.util.Properties getProperties()
Returns subset of system properties that match aleph.*.
Returns:
aleph-related properties

exit

public static void exit(java.lang.String why)
Shut down the computation gracefully.
Parameters:
why - the reason why

exit

public static void exit()
Shut down the computation gracefully.

exit

public static void exit(int code)
Shut down the computation gracefully.
Parameters:
code - status code

panic

public static void panic(java.lang.Throwable e)
Panic shutdown.
Print exception's detail message, stack trace, and dump interesting objects.
Parameters:
e - Exception that caused the problem.

panic

public static void panic(java.lang.String message)
Panic shutdown. Prints message and stack trace.
Parameters:
message - Famous last words.

setPopup

public static void setPopup(boolean value)
Should warning and error messages be displayed in popup windows?

getPopup

public static boolean getPopup()
Should warning and error messages be displayed in popup windows?

assert

public static void assert(boolean assertion,
                          java.lang.String label)
Test an assertion, panic on failure.
This is your brain on bugs.

debug

public static void debug(java.lang.String msg)
Send a line of output to debugging display.

debug

public static void debug(java.lang.String msg,
                         boolean trace)
Send a line of output to debugging stream.
See Also:
Config

main

public static void main(java.lang.String[] args)
Main startup for Aleph. Checks the configuration and either launches the gui or invokes batch mode.

getLongBanner

public static java.lang.String getLongBanner()
Print out long banner listing managers, etc.

setDebugFile

public static void setDebugFile(java.lang.String title)
reset name of debug file
Parameters:
title - debug file is .debug</DL> </DD> </DL> <HR> <A NAME="register(java.lang.String, java.lang.Object)"><!-- --></A><H3> register</H3> <PRE> public static void <B>register</B>(java.lang.String label, java.lang.Object object)</PRE> <DL> <DD>Register interesting object to be part of panic-induced dump.<DD><DL> <DT><B>Parameters:</B><DD><CODE>label</CODE> - suggestive tag<DD><CODE>object</CODE> - dump me!</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_bottom"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" ID="NavBarCell1Rev">  <FONT ID="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" ID="NavBarCell1"> <A HREF="../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2">  PREV CLASS   <A HREF="../aleph/AsynchMessage.html"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" ID="NavBarCell2"><FONT SIZE="-2"> <A HREF="../index.html" TARGET="_top"><B>FRAMES</B></A>    <A HREF="Aleph.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> </TR> <TR> <TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2"> SUMMARY:  INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" ID="NavBarCell3"><FONT SIZE="-2"> DETAIL:  FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <!-- =========== END OF NAVBAR =========== --> <HR> </BODY> </HTML>