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) Set<String>
inProgressIndexIds
-
Constructor Summary
Constructors Constructor Description ClientDrivenReindexOperation(FHIRBucketClient fhirClient, int maxConcurrentRequests, String reindexTimestamp, int maxResourceCount, String startWithIndexId)
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 com.ibm.fhir.bucket.reindex.DriveReindexOperation
intValue, safeSleep, str
-
-
-
-
Constructor Detail
-
ClientDrivenReindexOperation
public ClientDrivenReindexOperation(FHIRBucketClient fhirClient, int maxConcurrentRequests, String reindexTimestamp, int maxResourceCount, 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:
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.
-
-