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 voidinit()Start the main loopvoidmonitorLoop()The main monitor loop.protected voidsafeSleep(long ms)Sleep for the given number of ms, or until interruptedvoidsignalStop()Program is stopping, so tell the threads they can stop toovoidwaitForStop()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
-
-