org.jboss.dtf.testframework.coordinator2.runmanager
Class RunManager

java.lang.Object
  extended by java.lang.Thread
      extended by org.jboss.dtf.testframework.coordinator2.runmanager.RunManager
All Implemented Interfaces:
java.lang.Runnable, java.util.Comparator, ResultListener, NodeTicketReleaseListener

public class RunManager
extends java.lang.Thread
implements java.util.Comparator, NodeTicketReleaseListener, ResultListener


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
static int ALL_PERMUTATION_OPTION
           
static int OS_PERMUTATION_OPTION
           
static int PRODUCT_PERMUTATION_OPTION
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
RunManager(ScheduleInformation schedule, RunListener listener)
           
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
           
 java.lang.String[] getProductsInUse()
           
 RunUID getRunId()
           
 RunInformation getRunInformation()
           
 long getRunManagerId()
           
 ScheduleInformation getScheduleInformation()
           
 boolean isProductInUse(java.lang.String productId)
           
 boolean notifyNodeAvailable(OSProductCombination freeElement)
          This method is called by the nodemanager to inform the run manager that nodes have become available which it has registered an interest in.
 void releaseNodeTicket(java.util.ArrayList nodeList, OSProductCombination[] elements)
          Release the node ticket.
 boolean stopRun(boolean waitForTestToComplete)
          This method stops the run this runmanager is currently running.
 void testResult(RunListElement element, boolean failed)
           
 
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, run, 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
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

ALL_PERMUTATION_OPTION

public static final int ALL_PERMUTATION_OPTION
See Also:
Constant Field Values

OS_PERMUTATION_OPTION

public static final int OS_PERMUTATION_OPTION
See Also:
Constant Field Values

PRODUCT_PERMUTATION_OPTION

public static final int PRODUCT_PERMUTATION_OPTION
See Also:
Constant Field Values
Constructor Detail

RunManager

public RunManager(ScheduleInformation schedule,
                  RunListener listener)
           throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getScheduleInformation

public final ScheduleInformation getScheduleInformation()

getRunInformation

public final RunInformation getRunInformation()

getProductsInUse

public final java.lang.String[] getProductsInUse()

notifyNodeAvailable

public boolean notifyNodeAvailable(OSProductCombination freeElement)
This method is called by the nodemanager to inform the run manager that nodes have become available which it has registered an interest in.

Parameters:
freeElement -
Returns:
True if the node is required, false otherwise

stopRun

public boolean stopRun(boolean waitForTestToComplete)
This method stops the run this runmanager is currently running. If the waitForTestToComplete parameter is set to false then the tests are stopped immediated otherwise the tests are stopped after the current test execution is complete.

Parameters:
waitForTestToComplete -
Returns:

getRunId

public RunUID getRunId()

releaseNodeTicket

public void releaseNodeTicket(java.util.ArrayList nodeList,
                              OSProductCombination[] elements)
Release the node ticket.

Specified by:
releaseNodeTicket in interface NodeTicketReleaseListener
Parameters:
nodeList - The list of nodes to release.

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Specified by:
compare in interface java.util.Comparator

testResult

public void testResult(RunListElement element,
                       boolean failed)
Specified by:
testResult in interface ResultListener

isProductInUse

public boolean isProductInUse(java.lang.String productId)

getRunManagerId

public long getRunManagerId()