Class SearchTask

java.lang.Object
ca.uhn.fhir.jpa.search.builder.tasks.SearchTask
All Implemented Interfaces:
Callable<Void>
Direct Known Subclasses:
SearchContinuationTask

public class SearchTask extends Object implements Callable<Void>
A search task is a Callable task that runs in a thread pool to handle an individual search. One instance is created for any requested search and runs from the beginning to the end of the search.

Understand: This class executes in its own thread separate from the web server client thread that made the request. We do that so that we can return to the client as soon as possible, but keep the search going in the background (and have the next page of results ready to go when the client asks).