|
|
@ -72,9 +72,8 @@ public enum RejectedTypeEnum {
|
|
|
|
Collection<CustomRejectedExecutionHandler> customRejectedExecutionHandlers = DynamicTpServiceLoader
|
|
|
|
Collection<CustomRejectedExecutionHandler> customRejectedExecutionHandlers = DynamicTpServiceLoader
|
|
|
|
.getSingletonServiceInstances(CustomRejectedExecutionHandler.class);
|
|
|
|
.getSingletonServiceInstances(CustomRejectedExecutionHandler.class);
|
|
|
|
Optional<RejectedExecutionHandler> customRejected = customRejectedExecutionHandlers.stream()
|
|
|
|
Optional<RejectedExecutionHandler> customRejected = customRejectedExecutionHandlers.stream()
|
|
|
|
.map(each -> each.generateRejected())
|
|
|
|
|
|
|
|
.filter(each -> Objects.equals(type, each.getType()))
|
|
|
|
.filter(each -> Objects.equals(type, each.getType()))
|
|
|
|
.map(each -> each.getRejectedExecutionHandler())
|
|
|
|
.map(each -> each.generateRejected())
|
|
|
|
.findFirst();
|
|
|
|
.findFirst();
|
|
|
|
|
|
|
|
|
|
|
|
return customRejected.orElse(ABORT_POLICY.rejectedHandler);
|
|
|
|
return customRejected.orElse(ABORT_POLICY.rejectedHandler);
|
|
|
|