public class FederationManager extends Object
The factory FedXFactory
provides various functions for initialization of FedX and should be used as the entry
point for any application using FedX.
Config.initialize(fedxConfig); List<Endpoint> members = ... // e.g. use EndpointFactory methods FedXRepository repo = FedXFactory.initializeFederation(endpoints); ReositoryConnection conn = repo.getConnection(); // Do something with the connection, e.g. query evaluation repo.shutDown();
Modifier and Type | Class and Description |
---|---|
static class |
FederationManager.FederationType
The Federation type definition: Local, Remote, Hybrid
|
Constructor and Description |
---|
FederationManager() |
Modifier and Type | Method and Description |
---|---|
void |
addAll(List<Endpoint> endpoints)
Add the specified endpoints to the federation and take care for updating all structures.
|
void |
addEndpoint(Endpoint e,
boolean... updateStrategy)
Add the specified endpoint to the federation.
|
WorkerUnionBase<BindingSet> |
createWorkerUnion(QueryInfo queryInfo)
Create an appropriate worker union for this federation, i.e.
|
Executor |
getExecutor() |
FedX |
getFederation() |
FederationManager.FederationType |
getFederationType() |
ControlledWorkerScheduler<BindingSet> |
getJoinScheduler() |
ControlledWorkerScheduler<BindingSet> |
getLeftJoinScheduler() |
FederationEvalStrategy |
getStrategy() |
ControlledWorkerScheduler<BindingSet> |
getUnionScheduler() |
void |
init(FedX federation,
FederationContext federationContext) |
void |
removeAll()
Remove all endpoints from the federation, e.g.
|
void |
removeEndpoint(Endpoint e,
boolean... updateStrategy)
Remove the specified endpoint from the federation.
|
void |
reset()
Reset the
Scheduler instances, i.e. |
void |
shutDown()
Shutdown the federation including the following operations:
|
void |
updateStrategy()
Update the federation evaluation strategy using the classification of endpoints as provided by
Endpoint.getEndpointClassification() : |
public void init(FedX federation, FederationContext federationContext)
public void reset()
Scheduler
instances, i.e. abort all running threads and create a new scheduler instance.public Executor getExecutor()
public FedX getFederation()
public FederationEvalStrategy getStrategy()
public ControlledWorkerScheduler<BindingSet> getJoinScheduler()
public ControlledWorkerScheduler<BindingSet> getLeftJoinScheduler()
public ControlledWorkerScheduler<BindingSet> getUnionScheduler()
public FederationManager.FederationType getFederationType()
public void addEndpoint(Endpoint e, boolean... updateStrategy) throws FedXRuntimeException
e
- the endpointupdateStrategy
- optional parameter, to determine if strategy is to be updated, default=trueFedXRuntimeException
- if the federation has already a member with the same locationpublic void addAll(List<Endpoint> endpoints)
endpoints
- a list of endpoints to addpublic void removeEndpoint(Endpoint e, boolean... updateStrategy) throws RepositoryException
e
- the endpointupdateStrategy
- optional parameter, to determine if strategy is to be updated, default=trueRepositoryException
public void removeAll() throws RepositoryException
RepositoryException
public void shutDown() throws FedXException
FedXException
- if an error occurs while shutting down the federationpublic WorkerUnionBase<BindingSet> createWorkerUnion(QueryInfo queryInfo)
WorkerUnionBase
ControlledWorkerUnion
,
SynchronousWorkerUnion
public void updateStrategy()
Endpoint.getEndpointClassification()
:
Which strategy is applied depends on FederationEvaluationStrategyFactory
.
Default strategies:
SailFederationEvalStrategy
SparqlFederationEvalStrategy
SparqlFederationEvalStrategy
Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.