Package com.ibm.fhir.bucket.reindex
Class DriveReindexOperation
- java.lang.Object
-
- com.ibm.fhir.bucket.reindex.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 Summary
Constructors Constructor Description DriveReindexOperation(FHIRBucketClient fhirClient, int maxConcurrentRequests, String tstampParam, int resourceCountParam)
Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
init()
Start the main loopvoid
monitorLoop()
The main monitor loop.protected void
safeSleep(long ms)
Sleep for the given number of ms, or until interruptedvoid
signalStop()
Program is stopping, so tell the threads they can stop toovoid
waitForStop()
Wait until things are stopped
-
-
-
Constructor Detail
-
DriveReindexOperation
public DriveReindexOperation(FHIRBucketClient fhirClient, int maxConcurrentRequests, String tstampParam, int resourceCountParam)
Public constructor- Parameters:
client
- the FHIR clientmaxConcurrentRequests
- 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
-
-