alpha
Class AlphaRouter

java.lang.Object
  extended by java.lang.Thread
      extended by alpha.AlphaRouter
All Implemented Interfaces:
AlphaConstants, java.lang.Runnable

public class AlphaRouter
extends java.lang.Thread
implements AlphaConstants

AlphaRouter is the first implementation of a router in the SWC2 system. This class acts as a middleman between the master and workers.

The command-line syntax is as follows:
AlphaRouter [-d master_host] [-m master_port] [-w workers_port]
with the parameters reperesting the following:

Author:
Dino Klein
See Also:
AlphaMaster, AlphaWorker

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Fields inherited from interface alpha.AlphaConstants
AC_CONNECT_TO_MASTER_INTERVAL, AC_CONTROL_PORT, AC_DEFAULT_WORK_REQUEST_COUNT, AC_ROUTER_LIST_REQUEST_INTERVAL, AC_ROUTERS_PORT, AC_TASKS_CLEANUP_INTERVAL, AC_WORK_REQ_DELAY, AC_WORK_UNITS_THRESHOLD, AC_WORKER_WORK_REQ_DELAY, AC_WORKERS_PORT
 
Constructor Summary
AlphaRouter(java.net.InetAddress master_addr, int master_port, int workers_port, java.util.logging.Logger l)
           
 
Method Summary
 void logResultPileSize()
           
 void logWorkPileSize()
           
static void main(java.lang.String[] args)
           
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AlphaRouter

public AlphaRouter(java.net.InetAddress master_addr,
                   int master_port,
                   int workers_port,
                   java.util.logging.Logger l)
            throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

logWorkPileSize

public void logWorkPileSize()

logResultPileSize

public void logResultPileSize()

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

main

public static void main(java.lang.String[] args)