public final class ByCallerThreadGroupPolicy extends Object 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,
ThreadGroup parentGroup)
Builds a new
ByCallerThreadGroupPolicy with the given waitGroups. |
| Modifier and Type | Method and Description |
|---|---|
long |
getRejectedCount() |
void |
rejectedExecution(Runnable r,
ThreadPoolExecutor executor) |
public ByCallerThreadGroupPolicy(Set<ThreadGroup> waitGroups, ThreadGroup parentGroup)
ByCallerThreadGroupPolicy with the given waitGroups.waitGroups - the group of threads for which a WaitPolicy will be applied. For the rest, an ThreadPoolExecutor.AbortPolicy
will be applied.parentGroup - the SchedulerService parent ThreadGrouppublic void rejectedExecution(Runnable r, ThreadPoolExecutor executor)
rejectedExecution in interface RejectedExecutionHandlerpublic long getRejectedCount()
Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.