org.eclipse.emf.emfstore.internal.client.common
Class ScopedWorkspaceThreadPoolExecutor
java.lang.Object
java.util.concurrent.AbstractExecutorService
java.util.concurrent.ThreadPoolExecutor
org.eclipse.emf.emfstore.internal.client.common.ScopedWorkspaceThreadPoolExecutor
- All Implemented Interfaces:
- Executor, ExecutorService
public class ScopedWorkspaceThreadPoolExecutor
- extends ThreadPoolExecutor
This class extend ThreadPoolExecutor, and ensures than when each thread is asked
to run its task there is an initialization done on the thread first.
This initialization ensures that the static threadlocal ESWorkspaceProviderImpl
associated with the ESWorkspaceProviderImpl class is obtained from the thread
that is REQUESTING the thread pool to execute behavior, and set upon the thread
in the pool which actually EXECUTES the behavior.
Method Summary |
void |
execute(Runnable command)
This overridden method ensures that the runnable is updated to have access threadlocal ESWorkspaceProviderImpl
from the requesting thread set as the threadlocal ESWorkspaceProviderImpl of the executing thread. |
Methods inherited from class java.util.concurrent.ThreadPoolExecutor |
allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, 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 |
ScopedWorkspaceThreadPoolExecutor
public ScopedWorkspaceThreadPoolExecutor()
- Default constructor.
execute
public void execute(Runnable command)
This overridden method ensures that the runnable is updated to have access threadlocal ESWorkspaceProviderImpl
from the requesting thread set as the threadlocal ESWorkspaceProviderImpl of the executing thread.
- Specified by:
execute
in interface Executor
- Overrides:
execute
in class ThreadPoolExecutor
- See Also:
ThreadPoolExecutor.execute(java.lang.Runnable)
Copyright © 2015. All Rights Reserved.