edu.stanford.rsl.jpop
Class BlockThread

java.lang.Object
  extended by java.lang.Thread
      extended by edu.stanford.rsl.jpop.BlockThread
All Implemented Interfaces:
java.lang.Runnable

public class BlockThread
extends java.lang.Thread

Class to run the block evaluation in an independent Thread.

Author:
akmaier

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
 
Constructor Summary
BlockThread()
           
 
Method Summary
 int getBlock()
           
 OptimizableFunction getFunction()
           
 java.util.concurrent.CountDownLatch getLatch()
           
 FunctionOptimizer.OptimizationMode getMode()
           
 java.lang.Object getResult()
           
 double[] getX()
           
 void run()
           
 void setBlock(int block)
           
 void setFunction(OptimizableFunction function)
           
 void setLatch(java.util.concurrent.CountDownLatch latch)
           
 void setMode(FunctionOptimizer.OptimizationMode mode)
           
 void setX(double[] x)
           
 
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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BlockThread

public BlockThread()
Method Detail

getMode

public FunctionOptimizer.OptimizationMode getMode()
Returns:
the mode

setMode

public void setMode(FunctionOptimizer.OptimizationMode mode)
Parameters:
mode - the mode to set

getX

public double[] getX()
Returns:
the x

setX

public void setX(double[] x)
Parameters:
x - the x to set

getBlock

public int getBlock()
Returns:
the block

setBlock

public void setBlock(int block)
Parameters:
block - the block to set

getFunction

public OptimizableFunction getFunction()
Returns:
the function

setFunction

public void setFunction(OptimizableFunction function)
Parameters:
function - the function to set

getResult

public java.lang.Object getResult()
Returns:
the result

setLatch

public void setLatch(java.util.concurrent.CountDownLatch latch)
Parameters:
latch - the latch to set

getLatch

public java.util.concurrent.CountDownLatch getLatch()
Returns:
the latch

run

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