algo
Class DistRunTSP

java.lang.Object
  extended by java.lang.Thread
      extended by algo.DistRunTSP
All Implemented Interfaces:
java.lang.Runnable

 class DistRunTSP
extends java.lang.Thread

Thread to communicate with distributed processes.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
private  DistBestStore best
           
private  SocketChannel comm
           
private  Deque globalStack
           
private  long iter
           
private  long localWork
           
private static Logger logger
           
private  long maxIter
           
private  long pushes
           
private  long requests
           
private  java.util.ArrayList stack
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
DistRunTSP(Deque s, DistBestStore b, long max, SocketChannel comm)
           
 
Method Summary
 long getIterations()
           
 long getMaxIterations()
           
 void run()
           
 long setMaxIterations(long m)
           
 
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
 

Field Detail

best

private DistBestStore best

globalStack

private Deque globalStack

maxIter

private long maxIter

iter

private long iter

localWork

private long localWork

pushes

private long pushes

requests

private long requests

stack

private java.util.ArrayList stack

comm

private SocketChannel comm

logger

private static Logger logger
Constructor Detail

DistRunTSP

public DistRunTSP(Deque s,
                  DistBestStore b,
                  long max,
                  SocketChannel comm)
Parameters:
s - work queue.
b - current best path.
max - maximal number of iterations.
comm - a channel to the remote process.
Method Detail

run

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

getIterations

public long getIterations()
Returns:
iter.

getMaxIterations

public long getMaxIterations()
Returns:
maxIter.

setMaxIterations

public long setMaxIterations(long m)
Parameters:
m - new maximal number of iterations.
Returns:
old maxIter.