Class SecurityAwareThreadPoolExecutor
- java.lang.Object
-
- java.util.concurrent.AbstractExecutorService
-
- java.util.concurrent.ThreadPoolExecutor
-
- org.apache.ignite.thread.IgniteThreadPoolExecutor
-
- org.apache.ignite.internal.processors.security.thread.SecurityAwareThreadPoolExecutor
-
- All Implemented Interfaces:
Executor,ExecutorService,MetricsAwareExecutorService
public class SecurityAwareThreadPoolExecutor extends IgniteThreadPoolExecutor
ExtendsThreadPoolExecutorwith the ability to execute tasks in security context that was actual when task was added to executor's queue.
-
-
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 SecurityAwareThreadPoolExecutor(IgniteSecurity security, String threadNamePrefix, String igniteInstanceName, int corePoolSize, int maxPoolSize, long keepAliveTime, BlockingQueue<Runnable> workQ, byte plc, Thread.UncaughtExceptionHandler eHnd)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute(@NotNull Runnable cmd)<T> @NotNull List<Future<T>>invokeAll(@NotNull Collection<? extends Callable<T>> tasks)<T> @NotNull List<Future<T>>invokeAll(@NotNull Collection<? extends Callable<T>> tasks, long timeout, @NotNull TimeUnit unit)<T> TinvokeAny(@NotNull Collection<? extends Callable<T>> tasks)<T> TinvokeAny(@NotNull Collection<? extends Callable<T>> tasks, long timeout, @NotNull TimeUnit unit)@NotNull Future<?>submit(@NotNull Runnable task)<T> @NotNull Future<T>submit(@NotNull Runnable task, T res)<T> @NotNull Future<T>submit(@NotNull Callable<T> task)-
Methods inherited from class org.apache.ignite.thread.IgniteThreadPoolExecutor
afterExecute, beforeExecute, executionTimeMetric, registerMetrics
-
Methods inherited from class java.util.concurrent.ThreadPoolExecutor
allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, 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
newTaskFor, newTaskFor
-
-
-
-
Constructor Detail
-
SecurityAwareThreadPoolExecutor
public SecurityAwareThreadPoolExecutor(IgniteSecurity security, String threadNamePrefix, String igniteInstanceName, int corePoolSize, int maxPoolSize, long keepAliveTime, BlockingQueue<Runnable> workQ, byte plc, Thread.UncaughtExceptionHandler eHnd)
-
-
Method Detail
-
submit
@NotNull public <T> @NotNull Future<T> submit(@NotNull @NotNull Callable<T> task)
- Specified by:
submitin interfaceExecutorService- Overrides:
submitin classAbstractExecutorService
-
submit
@NotNull public <T> @NotNull Future<T> submit(@NotNull @NotNull Runnable task, T res)
- Specified by:
submitin interfaceExecutorService- Overrides:
submitin classAbstractExecutorService
-
submit
@NotNull public @NotNull Future<?> submit(@NotNull @NotNull Runnable task)
- Specified by:
submitin interfaceExecutorService- Overrides:
submitin classAbstractExecutorService
-
invokeAll
@NotNull public <T> @NotNull List<Future<T>> invokeAll(@NotNull @NotNull Collection<? extends Callable<T>> tasks) throws InterruptedException
- Specified by:
invokeAllin interfaceExecutorService- Overrides:
invokeAllin classAbstractExecutorService- Throws:
InterruptedException
-
invokeAll
@NotNull public <T> @NotNull List<Future<T>> invokeAll(@NotNull @NotNull Collection<? extends Callable<T>> tasks, long timeout, @NotNull @NotNull TimeUnit unit) throws InterruptedException
- Specified by:
invokeAllin interfaceExecutorService- Overrides:
invokeAllin classAbstractExecutorService- Throws:
InterruptedException
-
invokeAny
@NotNull public <T> T invokeAny(@NotNull @NotNull Collection<? extends Callable<T>> tasks) throws InterruptedException, ExecutionException- Specified by:
invokeAnyin interfaceExecutorService- Overrides:
invokeAnyin classAbstractExecutorService- Throws:
InterruptedExceptionExecutionException
-
invokeAny
public <T> T invokeAny(@NotNull @NotNull Collection<? extends Callable<T>> tasks, long timeout, @NotNull @NotNull TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException- Specified by:
invokeAnyin interfaceExecutorService- Overrides:
invokeAnyin classAbstractExecutorService- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-
execute
public void execute(@NotNull @NotNull Runnable cmd)- Specified by:
executein interfaceExecutor- Overrides:
executein classThreadPoolExecutor
-
-