APIdia Launch Partner
Top Fields Constructors Methods
sun.tools.jconsole

public Class Worker

extends Thread
Class Inheritance
Imports
java.util.*

Field Summary

Modifier and TypeField and Description
pack-priv ArrayList<Runnable>
private volatile boolean
Inherited from java.lang.Thread:
MAX_PRIORITYMIN_PRIORITYNORM_PRIORITY

Constructor Summary

AccessConstructor and Description
public
Worker(String name)

Method Summary

Modifier and TypeMethod and Description
public void
public boolean
public void
run()

Overrides java.lang.Thread.run.

Implements java.lang.Runnable.run.

This method is run by the thread when it executes.

public void
Inherited from java.lang.Thread:
activeCountcheckAccessclonecurrentThreaddumpStackenumerategetAllStackTracesgetContextClassLoadergetDefaultUncaughtExceptionHandlergetIdgetNamegetPrioritygetStackTracegetStategetThreadGroupgetUncaughtExceptionHandlerholdsLockinterruptinterruptedisAliveisDaemonisInterruptedisVirtualjoinjoinjoinjoinofPlatformofVirtualonSpinWaitsetContextClassLoadersetDaemonsetDefaultUncaughtExceptionHandlersetNamesetPrioritysetUncaughtExceptionHandlersleepsleepsleepstartstartVirtualThreadthreadIdtoStringyield

Field Detail

jobsback to summary
pack-priv ArrayList<Runnable> jobs
stoppedback to summary
private volatile boolean stopped

Constructor Detail

Workerback to summary
public Worker(String name)

Method Detail

addback to summary
public void add(Runnable job)
queueFullback to summary
public boolean queueFull()
runback to summary
public void run()

Overrides java.lang.Thread.run.

Implements java.lang.Runnable.run.

Doc from java.lang.Thread.run.

This method is run by the thread when it executes. Subclasses of Thread may override this method.

This method is not intended to be invoked directly. If this thread is a platform thread created with a Runnable task then invoking this method will invoke the task's run method. If this thread is a virtual thread then invoking this method directly does nothing.

stopWorkerback to summary
public void stopWorker()