Package com.ibm.fhir.bucket.reindex
Class ClientDrivenReindexOperation
- java.lang.Object
-
- com.ibm.fhir.bucket.reindex.DriveReindexOperation
-
- com.ibm.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)Public constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinit()Start the main loopvoidmonitorLoop()The main monitor loop.voidsignalStop()Program is stopping, so tell the threads they can stop toovoidwaitForStop()Wait until things are stopped-
Methods inherited from class com.ibm.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)
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 null
-
-
Method Detail
-
init
public void init()
Start the main loop- Specified by:
initin classDriveReindexOperation
-
signalStop
public void signalStop()
Program is stopping, so tell the threads they can stop too- Specified by:
signalStopin classDriveReindexOperation
-
waitForStop
public void waitForStop()
Wait until things are stopped- Specified by:
waitForStopin classDriveReindexOperation
-
monitorLoop
public void monitorLoop()
The main monitor loop.
-
-