public final class ByCallerThreadGroupPolicy extends AbstractByCallerPolicy implements RejectedExecutionHandler
RejectedExecutionHandler implementation to use according to the ThreadGroup of the
current thread. If the current thread is not a SchedulerService managed thread then
WaitPolicy is used.ThreadPoolExecutor.AbortPolicy,
WaitPolicy| Constructor and Description |
|---|
ByCallerThreadGroupPolicy(Set<ThreadGroup> waitGroups,
Set<ThreadGroup> runCpuLightWhenTargetBusyGroups,
ThreadGroup couLightGroup,
ThreadGroup parentGroup,
String schedulerName)
Builds a new
ByCallerThreadGroupPolicy with the given waitGroups. |
| Modifier and Type | Method and Description |
|---|---|
long |
getRejectedCount() |
void |
rejectedExecution(Runnable r,
ThreadPoolExecutor executor) |
isRunCpuLightWhenTargetBusyThread, isSchedulerThread, isWaitGroupThreadpublic ByCallerThreadGroupPolicy(Set<ThreadGroup> waitGroups, Set<ThreadGroup> runCpuLightWhenTargetBusyGroups, ThreadGroup couLightGroup, ThreadGroup parentGroup, String schedulerName)
ByCallerThreadGroupPolicy with the given waitGroups.waitGroups - the group of threads for which a WaitPolicy will be applied. For the rest, an ThreadPoolExecutor.AbortPolicy
(or ThreadPoolExecutor.CallerRunsPolicy if allowed) will be applied.runCpuLightWhenTargetBusyGroups - the group of threads for which a ThreadPoolExecutor.CallerRunsPolicy will be applied when
dispatching to cpu-light.couLightGroup - the group of cpuLight threadsparentGroup - the SchedulerService parent ThreadGroupschedulerName - the name of the target Schedulerpublic void rejectedExecution(Runnable r, ThreadPoolExecutor executor)
rejectedExecution in interface RejectedExecutionHandlerpublic long getRejectedCount()
Copyright © 2003–2018 MuleSoft, Inc.. All rights reserved.