org.openrdf.sail.optimistic
Class OptimisticInferencerConnection

java.lang.Object
  extended by org.openrdf.sail.helpers.SailConnectionWrapper
      extended by org.openrdf.sail.optimistic.OptimisticConnection
          extended by org.openrdf.sail.optimistic.OptimisticInferencerConnection
All Implemented Interfaces:
InferencerConnection, NotifyingSailConnection, SailConnection

public class OptimisticInferencerConnection
extends OptimisticConnection
implements InferencerConnection

Ensures serializable isolation for inferencer connections.

Author:
James Leigh

Constructor Summary
OptimisticInferencerConnection(OptimisticSail sail, InferencerConnection delegate)
           
 
Method Summary
 boolean addInferredStatement(Resource subj, URI pred, Value obj, Resource... contexts)
           
 void begin()
           
 void clearInferred(Resource... contexts)
           
 CloseableIteration<? extends BindingSet,QueryEvaluationException> evaluate(TupleExpr qry, Dataset dataset, BindingSet bindings, boolean inf)
           
 void flushUpdates()
           
 CloseableIteration<? extends Statement,SailException> getStatements(Resource subj, URI pred, Value obj, boolean inf, Resource... contexts)
           
 boolean removeInferredStatement(Resource subj, URI pred, Value obj, Resource... contexts)
           
 void rollback()
           
 long size(Resource... contexts)
           
 
Methods inherited from class org.openrdf.sail.optimistic.OptimisticConnection
addConnectionListener, addStatement, close, commit, getAddedModel, getReadOperations, getRemovedModel, isAutoCommit, notNull, removeConnectionListener, removeStatements
 
Methods inherited from class org.openrdf.sail.helpers.SailConnectionWrapper
clear, clearNamespaces, getContextIDs, getNamespace, getNamespaces, getWrappedConnection, isOpen, removeNamespace, setNamespace, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openrdf.sail.NotifyingSailConnection
addConnectionListener, removeConnectionListener
 
Methods inherited from interface org.openrdf.sail.SailConnection
addStatement, clear, clearNamespaces, close, commit, getContextIDs, getNamespace, getNamespaces, isOpen, removeNamespace, removeStatements, setNamespace
 

Constructor Detail

OptimisticInferencerConnection

public OptimisticInferencerConnection(OptimisticSail sail,
                                      InferencerConnection delegate)
Method Detail

addInferredStatement

public boolean addInferredStatement(Resource subj,
                                    URI pred,
                                    Value obj,
                                    Resource... contexts)
                             throws SailException
Specified by:
addInferredStatement in interface InferencerConnection
Throws:
SailException

clearInferred

public void clearInferred(Resource... contexts)
                   throws SailException
Specified by:
clearInferred in interface InferencerConnection
Throws:
SailException

removeInferredStatement

public boolean removeInferredStatement(Resource subj,
                                       URI pred,
                                       Value obj,
                                       Resource... contexts)
                                throws SailException
Specified by:
removeInferredStatement in interface InferencerConnection
Throws:
SailException

flushUpdates

public void flushUpdates()
                  throws SailException
Specified by:
flushUpdates in interface InferencerConnection
Throws:
SailException

begin

public void begin()
           throws SailException
Overrides:
begin in class OptimisticConnection
Throws:
SailException

rollback

public void rollback()
              throws SailException
Specified by:
rollback in interface SailConnection
Overrides:
rollback in class OptimisticConnection
Throws:
SailException

size

public long size(Resource... contexts)
          throws SailException
Specified by:
size in interface SailConnection
Overrides:
size in class OptimisticConnection
Throws:
SailException

getStatements

public CloseableIteration<? extends Statement,SailException> getStatements(Resource subj,
                                                                           URI pred,
                                                                           Value obj,
                                                                           boolean inf,
                                                                           Resource... contexts)
                                                                    throws SailException
Specified by:
getStatements in interface SailConnection
Overrides:
getStatements in class OptimisticConnection
Throws:
SailException

evaluate

public CloseableIteration<? extends BindingSet,QueryEvaluationException> evaluate(TupleExpr qry,
                                                                                  Dataset dataset,
                                                                                  BindingSet bindings,
                                                                                  boolean inf)
                                                                           throws SailException
Specified by:
evaluate in interface SailConnection
Overrides:
evaluate in class OptimisticConnection
Throws:
SailException


Copyright © 2004-2010 James Leigh Services Inc.. All Rights Reserved.