]
Adrian Nistor updated ISPN-8628:
--------------------------------
Fix Version/s: 9.4.0.Final
Simplify QueryEngine handling of Broadcast vs Fetch queries
-----------------------------------------------------------
Key: ISPN-8628
URL:
https://issues.jboss.org/browse/ISPN-8628
Project: Infinispan
Issue Type: Task
Reporter: Gustavo Fernandes
Assignee: Adrian Nistor
Priority: Minor
Fix For: 9.4.0.Final
[~anistor] commented
The existence of RemoteQueryDefinition and HsQueryRequest seems to be a symptom of
misplaced responsibility. It all starts with QueryDefinition.initialize, which IMO should
actually be placed inside QueryEngine, not QueryDefinition. Doing that refactoring will
remove the need for RemoteQueryDefinition, which now exists just to differentiate between
embedded and remote case, but that differentiation can be done inside the query engine
itself. Also, HsQueryRequest is just a data holder that carries the return value of
QueryEngine.createHsQuery. If QueryDefinition.initialize is moved to QueryEngine we would
also not need this anymore.
I did not think about it in detail but maybe we would also need to make QueryDefinition
mutable for QueryEngine and immutable for external parties. In that case we can extract
QueryDefinition as an immutable interface (exposing getters only) and it's
implementation class could have package local setters accessible to QueryEngine only.