Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.eclipse.core.internal.jobs
Class Worker  view Worker download Worker.java

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.eclipse.core.internal.jobs.Worker
All Implemented Interfaces:
java.lang.Runnable

public class Worker
extends java.lang.Thread

A worker thread processes jobs supplied to it by the worker pool. When the worker pool gives it a null job, the worker dies.


Nested Class Summary
 
Nested classes inherited from class java.lang.Thread
java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
private  InternalJob currentJob
           
private static int nextWorkerNumber
           
private  WorkerPool pool
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Worker(WorkerPool pool)
           
 
Method Summary
 org.eclipse.core.runtime.jobs.Job currentJob()
          Returns the currently running job, or null if none.
private  org.eclipse.core.runtime.IStatus handleException(InternalJob job, java.lang.Throwable t)
           
private  void log(org.eclipse.core.runtime.IStatus result)
           
 void run()
          The method of Thread that will be run if there is no Runnable object associated with the Thread.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, 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
 

Field Detail

nextWorkerNumber

private static int nextWorkerNumber

currentJob

private volatile InternalJob currentJob

pool

private final WorkerPool pool
Constructor Detail

Worker

public Worker(WorkerPool pool)
Method Detail

currentJob

public org.eclipse.core.runtime.jobs.Job currentJob()
Returns the currently running job, or null if none.


handleException

private org.eclipse.core.runtime.IStatus handleException(InternalJob job,
                                                         java.lang.Throwable t)

log

private void log(org.eclipse.core.runtime.IStatus result)

run

public void run()
Description copied from class: java.lang.Thread
The method of Thread that will be run if there is no Runnable object associated with the Thread. Thread's implementation does nothing at all.