public interface FederationStrategy
Source
s in the
list, process the Result
s in a unique way, and then return the results
to the client.
For example, implementations can choose to block until all SourceResponse
s return then do a mass sort, or to return the results back
to the client as soon as they are received back from a FederatedSource
.
Modifier and Type | Method and Description |
---|---|
QueryResponse |
federate(List<Source> sources,
QueryRequest query)
Federate the given query to the
List of Source s, returning a QueryResponse back to the user that will include the matching Result s. |
QueryResponse federate(List<Source> sources, QueryRequest query) throws FederationException
List
of Source
s, returning a QueryResponse
back to the user that will include the matching Result
s.sources
- the List
of Source
s to be queried. Cannot be null
or
empty.query
- the QueryRequest
to execute. Cannot be null
.QueryResponse
which contains the list of Result
s.FederationException
This work is licensed under a Creative Commons Attribution 4.0 International License.