public final class ByCallerThrottlingPolicy extends AbstractByCallerPolicy
ThrottledScheduler.
Each ThrottledScheduler must have its own instance of a ByCallerThrottlingPolicy since it keeps state relative
to the owning ThrottledScheduler.
| Constructor and Description |
|---|
ByCallerThrottlingPolicy(int maxConcurrentTasks,
Set<ThreadGroup> waitGroups,
ThreadGroup parentGroup)
Builds a new
ByCallerThrottlingPolicy with the given waitGroups. |
| Modifier and Type | Method and Description |
|---|---|
long |
getRejectedCount() |
void |
throttle(Runnable throttledCallback,
RunnableFuture<?> task,
ThrottledScheduler scheduler) |
void |
throttleWrapUp() |
String |
toString() |
isRunCpuLightWhenTargetBusyThread, isSchedulerThread, isWaitGroupThreadpublic ByCallerThrottlingPolicy(int maxConcurrentTasks,
Set<ThreadGroup> waitGroups,
ThreadGroup parentGroup)
ByCallerThrottlingPolicy with the given waitGroups.maxConcurrentTasks - how many tasks can be running at the same time for the owner ThrottledScheduler.waitGroups - the group of threads for which waiting will be applied. For the rest, any task exceeding the throttle value
will be rejected.parentGroup - the SchedulerService parent ThreadGrouppublic void throttle(Runnable throttledCallback, RunnableFuture<?> task, ThrottledScheduler scheduler)
public void throttleWrapUp()
public long getRejectedCount()
Copyright © 2003–2018 MuleSoft, Inc.. All rights reserved.