Class ProgressMonitorExecutor
- java.lang.Object
-
- java.util.concurrent.AbstractExecutorService
-
- java.util.concurrent.ThreadPoolExecutor
-
- org.openstreetmap.josm.gui.progress.swing.ProgressMonitorExecutor
-
- All Implemented Interfaces:
Executor
,ExecutorService
public class ProgressMonitorExecutor extends ThreadPoolExecutor
Executor that displays the progress monitor to the user. Similar to Executors.newSingleThreadExecutor(), but displays the progress monitor whenever a new task is executed.- Since:
- 12675 (moved from
gui.progress
package}
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
-
-
Constructor Summary
Constructors Constructor Description ProgressMonitorExecutor(String nameFormat, int threadPriority)
Creates a newProgressMonitorExecutor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterExecute(Runnable r, Throwable t)
void
execute(Runnable command)
-
Methods inherited from class java.util.concurrent.ThreadPoolExecutor
allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, shutdown, shutdownNow, terminated, toString
-
Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
-
-
-
-
Constructor Detail
-
ProgressMonitorExecutor
public ProgressMonitorExecutor(String nameFormat, int threadPriority)
Creates a newProgressMonitorExecutor
- Parameters:
nameFormat
- seeUtils.newThreadFactory(String, int)
threadPriority
- seeUtils.newThreadFactory(String, int)
-
-
Method Detail
-
execute
public void execute(Runnable command)
- Specified by:
execute
in interfaceExecutor
- Overrides:
execute
in classThreadPoolExecutor
-
afterExecute
public void afterExecute(Runnable r, Throwable t)
- Overrides:
afterExecute
in classThreadPoolExecutor
-
-