Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-8628

Simplify QueryEngine handling of Broadcast vs Fetch queries

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Obsolete
    • Icon: Minor Minor
    • None
    • None
    • None
    • None

      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.

            Unassigned Unassigned
            gfernand@redhat.com Gustavo Fernandes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: