com.rapidminer.gui.tools
Class UpdateQueue

java.lang.Object
  extended by java.lang.Thread
      extended by com.rapidminer.gui.tools.UpdateQueue
All Implemented Interfaces:
java.lang.Runnable

public class UpdateQueue
extends java.lang.Thread

A queue of runnables in which only execution of the last is relevant. Older runnables become obsolete as soon as a new is inserted.

Author:
Simon Fischer

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
UpdateQueue(java.lang.String name)
           
 
Method Summary
 void execute(java.lang.Runnable runnable)
          Queues runnable for execution.
 void run()
           
 
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
 

Constructor Detail

UpdateQueue

public UpdateQueue(java.lang.String name)
Method Detail

execute

public void execute(java.lang.Runnable runnable)
Queues runnable for execution. Will be executed as soon as the current runnable has terminated. If there is no current executable, will be executed immediately (in the thread created by this instance). If this method is called again before the current runnable is executed, runnable will be discarded in favor of the new.


run

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


Copyright © 2001-2009 by Rapid-I