Class ClientDrivenReindexOperation
- java.lang.Object
-
- org.linuxforhealth.fhir.bucket.reindex.DriveReindexOperation
-
- org.linuxforhealth.fhir.bucket.reindex.ClientDrivenReindexOperation
-
public class ClientDrivenReindexOperation extends DriveReindexOperation
Drives the $reindex custom operation in parallel from the client side via use of the $retrieve-index operation. Processing continues until index IDs indicate that no resources remain to be reindexed.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.Set<java.lang.String>
inProgressIndexIds
-
Constructor Summary
Constructors Constructor Description ClientDrivenReindexOperation(FHIRBucketClient fhirClient, int maxConcurrentRequests, java.lang.String reindexTimestamp, int maxResourceCount, java.lang.String startWithIndexId, boolean force)
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.void
signalStop()
Program is stopping, so tell the threads they can stop toovoid
waitForStop()
Wait until things are stopped-
Methods inherited from class org.linuxforhealth.fhir.bucket.reindex.DriveReindexOperation
intValue, str
-
-
-
-
Constructor Detail
-
ClientDrivenReindexOperation
public ClientDrivenReindexOperation(FHIRBucketClient fhirClient, int maxConcurrentRequests, java.lang.String reindexTimestamp, int maxResourceCount, java.lang.String startWithIndexId, boolean force)
Public constructor.- Parameters:
fhirClient
- the FHIR clientmaxConcurrentRequests
- the number of threads to spin upreindexTimestamp
- timestamp the reindex beganmaxResourceCount
- resources processed per request per threadstartWithIndexId
- index ID from which to start, or nullforce
- force the reindex even if the parameter hash matches
-
-
Method Detail
-
init
public void init()
Start the main loop- Specified by:
init
in classDriveReindexOperation
-
signalStop
public void signalStop()
Program is stopping, so tell the threads they can stop too- Specified by:
signalStop
in classDriveReindexOperation
-
waitForStop
public void waitForStop()
Wait until things are stopped- Specified by:
waitForStop
in classDriveReindexOperation
-
monitorLoop
public void monitorLoop()
The main monitor loop.
-
-