public abstract class AbstractFederationStrategy extends Object implements FederationStrategy
FederationStrategy interface. Other
classes can extend this class to create specific attributes to sort by.| Modifier and Type | Field and Description |
|---|---|
protected List<PostFederatedQueryPlugin> |
postQuery
|
protected List<PreFederatedQueryPlugin> |
preQuery
|
| Constructor and Description |
|---|
AbstractFederationStrategy(ExecutorService queryExecutorService)
Deprecated.
- only to provide support for deprecated FifoFederationStrategy and
SortedFederationStrategy
|
AbstractFederationStrategy(ExecutorService queryExecutorService,
List<PreFederatedQueryPlugin> preQuery,
List<PostFederatedQueryPlugin> postQuery)
Instantiates an
AbstractFederationStrategy with the provided ExecutorService. |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Runnable |
createMonitor(ExecutorService queryExecutorService,
Map<Source,Future<SourceResponse>> futures,
QueryResponseImpl returnResults,
Query query)
Creates the monitor for federated queries.
|
QueryResponse |
federate(List<Source> sources,
QueryRequest queryRequest)
Federate the given query to the
List of Sources, returning a QueryResponse back to the user that will include the matching Results. |
void |
setMaxStartIndex(int maxStartIndex)
To be set via Spring/Blueprint
|
protected List<PreFederatedQueryPlugin> preQuery
protected List<PostFederatedQueryPlugin> postQuery
public AbstractFederationStrategy(ExecutorService queryExecutorService)
AbstractFederationStrategy with the provided ExecutorService.queryExecutorService - the ExecutorService for queriespublic AbstractFederationStrategy(ExecutorService queryExecutorService, List<PreFederatedQueryPlugin> preQuery, List<PostFederatedQueryPlugin> postQuery)
AbstractFederationStrategy with the provided ExecutorService.queryExecutorService - the ExecutorService for queriesprotected abstract Runnable createMonitor(ExecutorService queryExecutorService, Map<Source,Future<SourceResponse>> futures, QueryResponseImpl returnResults, Query query)
queryExecutorService - futures - returnResults - the query resultsquery - Runnablepublic QueryResponse federate(List<Source> sources, QueryRequest queryRequest)
FederationStrategyList of Sources, returning a QueryResponse back to the user that will include the matching Results.federate in interface FederationStrategysources - the List of Sources to be queried. Cannot be null or
empty.queryRequest - the QueryRequest to execute. Cannot be null.QueryResponse which contains the list of Results.public void setMaxStartIndex(int maxStartIndex)
maxStartIndex - the new default max start index valueThis work is licensed under a Creative Commons Attribution 4.0 International License.