Skip to main content

DeferredResult

Learn DeferredResult (Performance Optimization, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Fresher Notes DeferredResult : a controller returns a DeferredResult<T> object now, and any other thread completes it later with setResult . Use case : the answer depends on something outside the request, such as a message, an event or another service callback. Servlet thread freed : the request stays open, but no container thread is held while waiting.

More lessons in Performance Optimization