jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [1/3] jena git commit: Dataset to tracks DatasetGraph "supports" operations.
Date Sat, 06 Feb 2016 16:14:35 GMT
Repository: jena
Updated Branches:
  refs/heads/master 666e79bf0 -> 315a713b0


Dataset to tracks DatasetGraph "supports" operations.

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/73d9e8ec
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/73d9e8ec
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/73d9e8ec

Branch: refs/heads/master
Commit: 73d9e8ece04de0c8233f0864adced5c57b4bbfe1
Parents: 666e79b
Author: Andy Seaborne <andy@apache.org>
Authored: Sat Feb 6 15:56:52 2016 +0000
Committer: Andy Seaborne <andy@apache.org>
Committed: Sat Feb 6 15:56:52 2016 +0000

----------------------------------------------------------------------
 .../java/org/apache/jena/query/Dataset.java     | 22 ++++++++++++++++----
 .../apache/jena/sparql/core/DatasetGraph.java   |  2 +-
 .../apache/jena/sparql/core/DatasetImpl.java    |  7 ++++++-
 3 files changed, 25 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/73d9e8ec/jena-arq/src/main/java/org/apache/jena/query/Dataset.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/query/Dataset.java b/jena-arq/src/main/java/org/apache/jena/query/Dataset.java
index 12e6d52..b8413aa 100644
--- a/jena-arq/src/main/java/org/apache/jena/query/Dataset.java
+++ b/jena-arq/src/main/java/org/apache/jena/query/Dataset.java
@@ -62,13 +62,27 @@ public interface Dataset extends Transactional
     /** Get the context associated with this dataset */
     public Context getContext() ;
 
-    /** Does this dataset support transactions?
-     *  Supporting transactions mean that the dataset implementation
-     *  provides {@link #begin}, {@link #commit}, {@link #abort}, {@link #end}
-     *  which otherwise may throw {@link UnsupportedOperationException}
+    /**
+     * Does this dataset support transactions? Supporting transactions mean that
+     * the dataset implementation provides {@link #begin}, {@link #commit},
+     * {@link #end} which otherwise may throw
+     * {@link UnsupportedOperationException}.
+     * <p>
+     * A {@code Dataset} that provide functionality acorss independent systems
+     * can not provide such strong guarantees. For example, they may use MRSW
+     * locking and some isolation control. Specifically, they do not necessarily
+     * provide {@link #abort}.
+     * <p>
+     * See {@link #supportsTransactionAbort()} for {@link #abort}.
+     * In addition, check details of a specific implementation.
      */
     public boolean supportsTransactions() ;
     
+    /** Declare whether {@link #abort} is supported.
+     *  This goes along with clearing up after exceptions inside application transaction
code.
+     */
+    public boolean supportsTransactionAbort() ;
+    
     /** Start either a READ or WRITE transaction */ 
     @Override
     public void begin(ReadWrite readWrite) ;

http://git-wip-us.apache.org/repos/asf/jena/blob/73d9e8ec/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraph.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraph.java b/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraph.java
index 650e191..634fe9a 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraph.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraph.java
@@ -145,7 +145,7 @@ public interface DatasetGraph extends Transactional, Closeable
      * A {@code DatasetGraph} supports tranactions if it provides {@link #begin}/
      * {@link #commit}/{@link #end}. There core storage {@code DatasetGraph} that
      * provide fully serialized transactions.  {@code DatasetGraph} that provide
-     * fucntionality acorss independent systems can not provide such strong guarantees.
+     * functionality acorss independent systems can not provide such strong guarantees.
      * For example, they may use MRSW locking and some isolation control.
      * Specifically, they do not necessarily provide {@link #abort}.
      * <p>

http://git-wip-us.apache.org/repos/asf/jena/blob/73d9e8ec/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetImpl.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetImpl.java b/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetImpl.java
index fdbb74b..6ed70c0 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetImpl.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetImpl.java
@@ -98,7 +98,12 @@ public class DatasetImpl implements Dataset
     
     @Override
     public boolean supportsTransactions() {
-        return transactional != null ;
+        return dsg.supportsTransactions() ;
+    }
+
+    @Override
+    public boolean supportsTransactionAbort() {
+        return dsg.supportsTransactionAbort() ;
     }
 
     @Override


Mime
View raw message