live.threads
Class ThreadedZVMTasks.FindCommonFreeAddress

java.lang.Object
  extended byjava.lang.Thread
      extended bylive.threads.ThreadedUserAction
          extended bylive.threads.ThreadedZVMTasks.FindCommonFreeAddress
All Implemented Interfaces:
Runnable
Enclosing class:
ThreadedZVMTasks

public static class ThreadedZVMTasks.FindCommonFreeAddress
extends ThreadedUserAction

This class finds the free address from several different guests and finds the lowest span of 3 addresses that are free in all of them. Wraps ZVMTasks.getCommonAddress(Collection).


Nested Class Summary
private  class ThreadedZVMTasks.FindCommonFreeAddress.ProgressListener
           
 
Nested classes inherited from class live.threads.ThreadedUserAction
 
Field Summary
private  String hexAddress
           
(package private)  ThreadedZVMTasks.FindCommonFreeAddress.ProgressListener listener
           
private  Collection memberNames
           
private  int numberDone
           
 
Fields inherited from class live.threads.ThreadedUserAction
CANCELED, COMPLETE, done, ERROR, IN_PROGRESS, INDETERMINATE, PENDING, tasks
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ThreadedZVMTasks.FindCommonFreeAddress(ThreadInitInfo initInfo, Collection memberNames)
          Sets up an action that will get list of free addresses for all the memberNames then compare them to get a commmon free address; Wraps live.zvmtasks
 
Method Summary
 ThreadedZVMTasks.FindCommonFreeAddress addSource(String guestName)
          Returns the object being operated on so that it can be chained, for instance a.addSource().addSource(), or b = a.addSource(p) will add p to a, then make b point to a.
 String description()
          Returns a description of this task
 Object rawResult()
          Returns a String with the four-digit hex address of the lowest free address, an Exception if there was an error or no common address can be found, or null if the call hasn't been completed.
 String result()
          Returns the resultString for the task, concatenated with how many queries have been done so far.
 void runImpl()
          Calls ZVMTasks.getCommonAddress(Collection)
 
Methods inherited from class live.threads.ThreadedUserAction
getCache, getException, getID, getStatus, getTimeFinished, getTimeStarted, init, init, isFinished, run, setCanceled, setComplete, setError, setError, setIndeterminate, setIndeterminate, setInProgress, startJoinForever, startJoinTimeout, startNoJoin, toString
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

numberDone

private int numberDone

memberNames

private Collection memberNames

hexAddress

private String hexAddress

listener

ThreadedZVMTasks.FindCommonFreeAddress.ProgressListener listener
Constructor Detail

ThreadedZVMTasks.FindCommonFreeAddress

public ThreadedZVMTasks.FindCommonFreeAddress(ThreadInitInfo initInfo,
                                              Collection memberNames)
Sets up an action that will get list of free addresses for all the memberNames then compare them to get a commmon free address; Wraps live.zvmtasks

Parameters:
initInfo - The ThreadInitInfo object
memberNames - A linked list of Strings that are names of the guests you want to find a common free address span among.
Method Detail

addSource

public ThreadedZVMTasks.FindCommonFreeAddress addSource(String guestName)
Returns the object being operated on so that it can be chained, for instance a.addSource().addSource(), or b = a.addSource(p) will add p to a, then make b point to a.

Parameters:
guestName -
Returns:
FindCommonFreeAddress The FindCommonFreeAddress method will be called and the name appended to the list of strings

runImpl

public void runImpl()
             throws ZVMTasksException
Calls ZVMTasks.getCommonAddress(Collection)

Specified by:
runImpl in class ThreadedUserAction
Throws:
ZVMTasksException
See Also:
ThreadedUserAction.run()

description

public String description()
Returns a description of this task

Specified by:
description in class ThreadedUserAction
Returns:
String description
See Also:
ThreadedUserAction.toString()

result

public String result()
Returns the resultString for the task, concatenated with how many queries have been done so far.

Overrides:
result in class ThreadedUserAction
Returns:
String result of the functions

rawResult

public Object rawResult()
Returns a String with the four-digit hex address of the lowest free address, an Exception if there was an error or no common address can be found, or null if the call hasn't been completed.

Specified by:
rawResult in class ThreadedUserAction
Returns:
A String with the common address in hex, exception, or null


Copyright © 2005