Class DriveReindexOperation


  • public class DriveReindexOperation
    extends Object
    Drives the $reindex custom operation in parallel. Each thread keeps running until the OperationOutcome indicates that no work remains to be processed.
    • Constructor Detail

      • DriveReindexOperation

        public DriveReindexOperation​(FHIRBucketClient fhirClient,
                                     int maxConcurrentRequests,
                                     String tstampParam,
                                     int resourceCountParam)
        Public constructor
        Parameters:
        client - the FHIR client
        maxConcurrentRequests - the number of threads to spin up
    • Method Detail

      • init

        public void init()
        Start the main loop
      • monitorLoop

        public void monitorLoop()
        The main monitor loop.
      • safeSleep

        protected void safeSleep​(long ms)
        Sleep for the given number of ms, or until interrupted
        Parameters:
        ms -
      • signalStop

        public void signalStop()
        Program is stopping, so tell the threads they can stop too
      • waitForStop

        public void waitForStop()
        Wait until things are stopped