Class FHIRRemoteIndexKafkaService
- java.lang.Object
-
- org.linuxforhealth.fhir.persistence.index.FHIRRemoteIndexService
-
- org.linuxforhealth.fhir.server.index.kafka.FHIRRemoteIndexKafkaService
-
public class FHIRRemoteIndexKafkaService extends FHIRRemoteIndexService
Forwards parameter blocks to a partitioned Kafka topic. This allows us to skip the expensive parameter insert operations during ingestion and offload them to a separate process where we can process the operations more efficiently by using larger batches and different concurrency control mechanisms
-
-
Constructor Summary
Constructors Constructor Description FHIRRemoteIndexKafkaService()Default constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> java.util.concurrent.CompletableFuture<T>backToThe(java.util.concurrent.Future<T> f)Convert a Future into a CompletableFuturevoidinit(KafkaPropertyAdapter properties)Initialize the providervoidshutdown()Performs any necessary "shutdown" logic to disconnect from the topic.IndexProviderResponsesubmit(RemoteIndexData data)Submit the index data request to the async indexing service we represent-
Methods inherited from class org.linuxforhealth.fhir.persistence.index.FHIRRemoteIndexService
getServiceInstance, setServiceInstance
-
-
-
-
Method Detail
-
init
public void init(KafkaPropertyAdapter properties)
Initialize the provider- Parameters:
properties-
-
shutdown
public void shutdown()
Performs any necessary "shutdown" logic to disconnect from the topic.
-
submit
public IndexProviderResponse submit(RemoteIndexData data)
Description copied from class:FHIRRemoteIndexServiceSubmit the index data request to the async indexing service we represent- Specified by:
submitin classFHIRRemoteIndexService- Returns:
- A wrapper for a CompletableFuture which completes when the request is acknowledged to have been received by the async service
-
backToThe
public static <T> java.util.concurrent.CompletableFuture<T> backToThe(java.util.concurrent.Future<T> f)
Convert a Future into a CompletableFuture- Type Parameters:
T-- Parameters:
f-- Returns:
-
-