Package ca.uhn.fhir.jpa.search.reindex
Class BlockPolicy
java.lang.Object
ca.uhn.fhir.jpa.search.reindex.BlockPolicy
- All Implemented Interfaces:
RejectedExecutionHandler
A handler for rejected tasks that will have the caller block until space is available.
This was stolen from old hibernate search(5.X.X), as it has been removed in HS6. We can probably come up with a better solution though.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Puts the Runnable to the blocking queue, effectively blocking the delegating thread until space is available.
-
Constructor Details
-
BlockPolicy
public BlockPolicy()
-
-
Method Details
-
rejectedExecution
Puts the Runnable to the blocking queue, effectively blocking the delegating thread until space is available.- Specified by:
rejectedExecution
in interfaceRejectedExecutionHandler
- Parameters:
r
- the runnable task requested to be executede
- the executor attempting to execute this task
-