Java源码示例:org.eclipse.rdf4j.sail.helpers.AbstractSail
示例1
/**
* Creates a new {@link SailConnection}, using the given {@link SailStore} to manage the state.
*
* @param sail
* @param store
* @param evalStratFactory the {@link EvaluationStrategyFactory} to use.
*/
protected SailSourceConnection(AbstractSail sail, SailStore store, EvaluationStrategyFactory evalStratFactory) {
super(sail);
this.vf = sail.getValueFactory();
this.store = store;
this.defaultIsolationLevel = sail.getDefaultIsolationLevel();
this.evalStratFactory = evalStratFactory;
this.federatedServiceResolver = (evalStratFactory instanceof StrictEvaluationStrategyFactory)
? ((StrictEvaluationStrategyFactory) evalStratFactory).getFederatedServiceResolver()
: null;
}
示例2
public AbstractFederationConnection(Federation federation, List<RepositoryConnection> members) {
super(new AbstractSail() {
@Override
public boolean isWritable() throws SailException {
return false;
}
@Override
public ValueFactory getValueFactory() {
return SimpleValueFactory.getInstance();
}
@Override
protected void shutDownInternal() throws SailException {
// ignore
}
@Override
protected SailConnection getConnectionInternal() throws SailException {
return null;
}
@Override
protected void connectionClosed(SailConnection connection) {
// ignore
}
@Override
public List<IsolationLevel> getSupportedIsolationLevels() {
return Arrays.asList(new IsolationLevel[] { IsolationLevels.NONE });
}
@Override
public IsolationLevel getDefaultIsolationLevel() {
return IsolationLevels.NONE;
}
});
this.federation = federation;
valueFactory = SimpleValueFactory.getInstance();
this.members = new ArrayList<>(members);
}
示例3
/**
* Creates a new {@link SailConnection}, using the given {@link SailStore} to manage the state.
*
* @param sail
* @param store
* @param resolver the FederatedServiceResolver to use with the {@link StrictEvaluationStrategy default
* EvaluationStrategy}.
*/
protected SailSourceConnection(AbstractSail sail, SailStore store, FederatedServiceResolver resolver) {
this(sail, store, new StrictEvaluationStrategyFactory(resolver));
}