Class SearchCoordinatorSvcImpl.SearchTask

  • All Implemented Interfaces:
    Callable<Void>
    Direct Known Subclasses:
    SearchCoordinatorSvcImpl.SearchContinuationTask
    Enclosing class:
    SearchCoordinatorSvcImpl

    public class SearchCoordinatorSvcImpl.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).

    • Constructor Detail

      • SearchTask

        protected SearchTask​(Search theSearch,
                             ca.uhn.fhir.jpa.api.dao.IDao theCallingDao,
                             SearchParameterMap theParams,
                             String theResourceType,
                             ca.uhn.fhir.rest.api.server.RequestDetails theRequest,
                             ca.uhn.fhir.interceptor.model.RequestPartitionId theRequestPartitionId)
        Constructor
    • Method Detail

      • call

        public Void call()
        This is the method which actually performs the search. It is called automatically by the thread pool.
        Specified by:
        call in interface Callable<Void>