jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [1/2] jena git commit: Look to see if it is a dataset monitor.
Date Mon, 16 Mar 2015 21:39:47 GMT
Repository: jena
Updated Branches:
  refs/heads/master 503a73504 -> 300f9b79e


Look to see if it is a dataset monitor.

If it is, call start/finish.

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

Branch: refs/heads/master
Commit: 022539e0c01fdd7f4c5b47f79b01004276272395
Parents: 503a735
Author: Andy Seaborne <andy@apache.org>
Authored: Mon Mar 16 21:39:30 2015 +0000
Committer: Andy Seaborne <andy@apache.org>
Committed: Mon Mar 16 21:39:30 2015 +0000

----------------------------------------------------------------------
 .../java/com/hp/hpl/jena/sparql/core/DatasetGraphWithLock.java | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/022539e0/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/DatasetGraphWithLock.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/DatasetGraphWithLock.java
b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/DatasetGraphWithLock.java
index 3fc3feb..243388b 100644
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/DatasetGraphWithLock.java
+++ b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/core/DatasetGraphWithLock.java
@@ -87,6 +87,9 @@ public class DatasetGraphWithLock extends DatasetGraphTrackActive implements
Syn
         boolean b = isTransactionType(ReadWrite.READ) ;
         get().getLock().enterCriticalSection(b) ;
         inTransaction.set(true) ;
+        if (get() instanceof DatasetGraphMonitor) {
+            ((DatasetGraphMonitor)get()).getMonitor().start();
+        }
     }
 
     @Override
@@ -115,6 +118,9 @@ public class DatasetGraphWithLock extends DatasetGraphTrackActive implements
Syn
     @Override
     protected void _end() {
         if ( isInTransaction() ) {
+            if (get() instanceof DatasetGraphMonitor) {
+                ((DatasetGraphMonitor)get()).getMonitor().finish();
+            }
             get().getLock().leaveCriticalSection() ;
             clearState() ;
         }


Mime
View raw message