public class FedXConnection extends AbstractSailConnection
FederationEvalStrategy
to evaluate provided queries.
Prior to evaluation various optimizations are performed, see
FedXOptimizer
for further details.
Since 4.0 FedX supports write operations using the supplied WriteStrategy
, e.g. by writing to a designated
federation member. Note: the WriteStrategy
is initialized lazily upon first access to a write operation, see
getWriteStrategyInternal()
.
Implementation notes: - not all methods are implemented as of now
FederationEvalStrategy
,
WriteStrategy
Modifier and Type | Class and Description |
---|---|
protected static class |
FedXConnection.SailBaseDefaultImpl
A default implementation for
AbstractSail . |
Modifier and Type | Field and Description |
---|---|
protected FedX |
federation |
protected FederationContext |
federationContext |
connectionLock, updateLock
Constructor and Description |
---|
FedXConnection(FedX federation,
FederationContext federationContext) |
Modifier and Type | Method and Description |
---|---|
protected void |
addStatementInternal(Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
protected void |
clearInternal(Resource... contexts) |
protected void |
clearNamespacesInternal() |
protected void |
closeInternal() |
protected void |
commitInternal() |
protected CloseableIteration<? extends BindingSet,QueryEvaluationException> |
evaluateInternal(TupleExpr query,
Dataset dataset,
BindingSet bindings,
boolean includeInferred) |
protected CloseableIteration<? extends Resource,SailException> |
getContextIDsInternal() |
protected String |
getNamespaceInternal(String prefix) |
protected CloseableIteration<? extends Namespace,SailException> |
getNamespacesInternal() |
protected CloseableIteration<? extends Statement,SailException> |
getStatementsInternal(Resource subj,
IRI pred,
Value obj,
boolean includeInferred,
Resource... contexts) |
protected WriteStrategy |
getWriteStrategyInternal()
Return the initialized
writeStrategy . |
boolean |
pendingRemovals()
Indicates if the Sail has any statement removal operations pending (not yet
flushed ) for the
current transaction. |
protected void |
removeNamespaceInternal(String prefix) |
protected void |
removeStatementsInternal(Resource subj,
IRI pred,
Value obj,
Resource... contexts) |
protected void |
rollbackInternal() |
protected void |
setNamespaceInternal(String prefix,
String name) |
protected long |
sizeInternal(Resource... contexts) |
protected void |
startTransactionInternal() |
addStatement, addStatement, autoStartTransaction, begin, begin, clear, clearNamespaces, close, commit, endUpdate, endUpdateInternal, evaluate, flush, getContextIDs, getExclusiveConnectionLock, getNamespace, getNamespaces, getSharedConnectionLock, getStatements, getTransactionIsolation, getTransactionLock, isActive, isActiveOperation, isOpen, iterationClosed, pendingAdds, prepare, prepareInternal, registerIteration, removeNamespace, removeStatement, removeStatements, rollback, setNamespace, size, startUpdate, transactionActive, verifyIsActive, verifyIsOpen
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addStatement, addStatement, getStatements, hasStatement, removeStatement, removeStatements
protected final FedX federation
protected final FederationContext federationContext
public FedXConnection(FedX federation, FederationContext federationContext) throws SailException
SailException
protected CloseableIteration<? extends BindingSet,QueryEvaluationException> evaluateInternal(TupleExpr query, Dataset dataset, BindingSet bindings, boolean includeInferred) throws SailException
evaluateInternal
in class AbstractSailConnection
SailException
protected void clearInternal(Resource... contexts) throws SailException
clearInternal
in class AbstractSailConnection
SailException
protected void clearNamespacesInternal() throws SailException
clearNamespacesInternal
in class AbstractSailConnection
SailException
protected void closeInternal() throws SailException
closeInternal
in class AbstractSailConnection
SailException
protected void commitInternal() throws SailException
commitInternal
in class AbstractSailConnection
SailException
protected CloseableIteration<? extends Resource,SailException> getContextIDsInternal() throws SailException
getContextIDsInternal
in class AbstractSailConnection
SailException
protected String getNamespaceInternal(String prefix) throws SailException
getNamespaceInternal
in class AbstractSailConnection
SailException
protected CloseableIteration<? extends Namespace,SailException> getNamespacesInternal() throws SailException
getNamespacesInternal
in class AbstractSailConnection
SailException
protected CloseableIteration<? extends Statement,SailException> getStatementsInternal(Resource subj, IRI pred, Value obj, boolean includeInferred, Resource... contexts) throws SailException
getStatementsInternal
in class AbstractSailConnection
SailException
protected void addStatementInternal(Resource subj, IRI pred, Value obj, Resource... contexts) throws SailException
addStatementInternal
in class AbstractSailConnection
SailException
protected void removeNamespaceInternal(String prefix) throws SailException
removeNamespaceInternal
in class AbstractSailConnection
SailException
protected void removeStatementsInternal(Resource subj, IRI pred, Value obj, Resource... contexts) throws SailException
removeStatementsInternal
in class AbstractSailConnection
SailException
protected void rollbackInternal() throws SailException
rollbackInternal
in class AbstractSailConnection
SailException
protected void setNamespaceInternal(String prefix, String name) throws SailException
setNamespaceInternal
in class AbstractSailConnection
SailException
protected long sizeInternal(Resource... contexts) throws SailException
sizeInternal
in class AbstractSailConnection
SailException
protected void startTransactionInternal() throws SailException
startTransactionInternal
in class AbstractSailConnection
SailException
protected WriteStrategy getWriteStrategyInternal() throws SailException
writeStrategy
. If this has not been done yet, WriteStrategy.initialize()
is returned. This method guarantees lazy initialization upon the first write operation on this
FedXConnection
instance.WriteStrategy
SailException
public boolean pendingRemovals()
SailConnection
flushed
) for the
current transaction.pendingRemovals
in interface SailConnection
pendingRemovals
in class AbstractSailConnection
SailConnection.flush()
Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.