|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
weka.gui.boundaryvisualizer.BoundaryPanel
weka.gui.boundaryvisualizer.BoundaryPanelDistributed
This class extends BoundaryPanel with code for distributing the processing necessary to create a visualization among a list of remote machines. Specifically, a visualization is broken down and processed row by row using the available remote computers.
BoundaryPanel
,
Serialized FormNested Class Summary |
Nested classes inherited from class weka.gui.boundaryvisualizer.BoundaryPanel |
BoundaryPanel.PlotThread |
Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
protected static int |
AVAILABLE
|
protected static int |
CONNECTION_FAILED
|
protected static int |
IN_USE
|
private int |
m_failedCount
The count of failed sub-tasks |
private int |
m_finishedCount
The count of successfully completed sub-tasks |
private int[] |
m_hostPollingTime
|
protected java.util.Vector |
m_listeners
a list of RemoteExperimentListeners |
private int |
m_minTaskPollTime
|
private boolean |
m_plottingAborted
Set to true if MAX_FAILURES exceeded on all hosts or connections fail on all hosts or user aborts plotting |
private int[] |
m_remoteHostFailureCounts
The number of times tasks have failed on each remote host |
protected java.util.Vector |
m_remoteHosts
Holds the names of machines with remoteEngine servers running |
private Queue |
m_remoteHostsQueue
The queue of available hosts |
private int[] |
m_remoteHostsStatus
The status of each of the remote hosts |
private int |
m_removedHosts
The number of hosts removed due to exceeding max failures |
private Queue |
m_subExpQueue
The queue of sub-tasks waiting to be processed |
protected static int |
MAX_FAILURES
|
protected static int |
SOME_OTHER_FAILURE
|
Fields inherited from class weka.gui.boundaryvisualizer.BoundaryPanel |
DEFAULT_COLORS, m_classifier, m_Colors, m_dataGenerator, m_maxX, m_maxY, m_minX, m_minY, m_numOfSamplesPerGenerator, m_numOfSamplesPerRegion, m_osi, m_panelHeight, m_panelWidth, m_pixHeight, m_pixWidth, m_plotTrainingData, m_probabilityCache, m_samplesBase, m_stopPlotting, m_stopReplotting, m_trainingData, m_xAttribute, m_yAttribute |
Fields inherited from class javax.swing.JPanel |
|
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Container |
|
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
BoundaryPanelDistributed(int panelWidth,
int panelHeight)
Creates a new BoundaryPanelDistributed instance. |
Method Summary | |
void |
addRemoteExperimentListener(RemoteExperimentListener r)
Add an object to the list of those interested in recieving update information from the RemoteExperiment |
protected void |
availableHost(int hostNum)
Push a host back onto the list of available hosts and launch a waiting Task (if any). |
private boolean |
checkForAllFailedHosts()
Check to see if we have failed to connect to all hosts |
protected void |
incrementFailed(int hostNum)
Increment the overall number of failures and the number of failures for a particular host |
protected void |
incrementFinished()
Increment the number of successfully completed sub experiments |
protected void |
initialize()
Set up the off screen bitmap for rendering to |
protected void |
launchNext(int wtask,
int ah)
|
static void |
main(java.lang.String[] args)
Main method for testing this class |
private void |
notifyListeners(boolean status,
boolean log,
boolean finished,
java.lang.String message)
Inform all listeners of progress |
void |
setRemoteHosts(java.util.Vector remHosts)
Set a list of host names of machines to distribute processing to |
void |
start()
Start processing |
protected void |
waitingTask(int expNum)
Push an experiment back on the queue of waiting experiments |
Methods inherited from class weka.gui.boundaryvisualizer.BoundaryPanel |
addActionListener, computeMinMaxAtts, getColors, getGeneratorSamplesBase, getNumSamplesPerRegion, getPlotTrainingData, plotPoint, plotTrainingData, removeActionListener, replot, saveImage, setClassifier, setColors, setDataGenerator, setGeneratorSamplesBase, setNumSamplesPerRegion, setPlotTrainingData, setTrainingData, setXAttribute, setYAttribute, stopPlotting |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.util.Vector m_listeners
protected java.util.Vector m_remoteHosts
private Queue m_remoteHostsQueue
private int[] m_remoteHostsStatus
private int[] m_remoteHostFailureCounts
protected static final int AVAILABLE
protected static final int IN_USE
protected static final int CONNECTION_FAILED
protected static final int SOME_OTHER_FAILURE
protected static final int MAX_FAILURES
private boolean m_plottingAborted
private int m_removedHosts
private int m_failedCount
private int m_finishedCount
private Queue m_subExpQueue
private int m_minTaskPollTime
private int[] m_hostPollingTime
Constructor Detail |
public BoundaryPanelDistributed(int panelWidth, int panelHeight)
BoundaryPanelDistributed
instance.
panelWidth
- width of the displaypanelHeight
- height of the displayMethod Detail |
public void setRemoteHosts(java.util.Vector remHosts)
remHosts
- a Vector of host names (Strings)public void addRemoteExperimentListener(RemoteExperimentListener r)
r
- a listenerprotected void initialize()
BoundaryPanel
initialize
in class BoundaryPanel
public void start() throws java.lang.Exception
start
in class BoundaryPanel
java.lang.Exception
- if an error occursprotected void availableHost(int hostNum)
hostNum
- the number of the host to return to the queue. -1
if no host to return.private void notifyListeners(boolean status, boolean log, boolean finished, java.lang.String message)
status
- true if this is a status type of messagelog
- true if this is a log type of messagefinished
- true if the remote task has finishedmessage
- the message.private boolean checkForAllFailedHosts()
protected void incrementFinished()
protected void incrementFailed(int hostNum)
hostNum
- the index of the host to increment failure countprotected void waitingTask(int expNum)
expNum
- the index of the experiment to push onto the queueprotected void launchNext(int wtask, int ah)
public static void main(java.lang.String[] args)
args
- a String[]
value
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |