Class SearchCoordinatorSvcImpl.SearchTask

All Implemented Interfaces:
Direct Known Subclasses:
Enclosing class:

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 Details

    • SearchTask

      protected SearchTask(Search theSearch, ca.uhn.fhir.jpa.api.dao.IDao theCallingDao, SearchParameterMap theParams, String theResourceType, theRequest, ca.uhn.fhir.interceptor.model.RequestPartitionId theRequestPartitionId)
  • Method Details

    • getSearch

      protected Search getSearch()
    • 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>