ThreadedOutcomesResolver Class — spring-boot Architecture
Architecture documentation for the ThreadedOutcomesResolver class in OnClassCondition.java from the spring-boot codebase.
Entity Profile
Relationship Graph
Source Code
core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnClassCondition.java lines 145–181
private static final class ThreadedOutcomesResolver implements OutcomesResolver {
private final Thread thread;
private volatile @Nullable ConditionOutcome @Nullable [] outcomes;
private volatile @Nullable Throwable failure;
private ThreadedOutcomesResolver(OutcomesResolver outcomesResolver) {
this.thread = new Thread(() -> {
try {
this.outcomes = outcomesResolver.resolveOutcomes();
}
catch (Throwable ex) {
this.failure = ex;
}
});
this.thread.start();
}
@Override
public @Nullable ConditionOutcome[] resolveOutcomes() {
try {
this.thread.join();
}
catch (InterruptedException ex) {
Thread.currentThread().interrupt();
}
Throwable failure = this.failure;
if (failure != null) {
ReflectionUtils.rethrowRuntimeException(failure);
}
@Nullable ConditionOutcome[] outcomes = this.outcomes;
return (outcomes != null) ? outcomes : new ConditionOutcome[0];
}
}
Domain
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free