jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r1162863 - in /jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk: Repository.java store/PersistenceManager.java
Date Mon, 29 Aug 2011 15:26:15 GMT
Author: stefan
Date: Mon Aug 29 15:26:15 2011
New Revision: 1162863

URL: http://svn.apache.org/viewvc?rev=1162863&view=rev
Log:
minor optimization

Modified:
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/Repository.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/PersistenceManager.java

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/Repository.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/Repository.java?rev=1162863&r1=1162862&r2=1162863&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/Repository.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/Repository.java
Mon Aug 29 15:26:15 2011
@@ -61,7 +61,8 @@ public class Repository {
         revStore.initialize(home);
 
         BlobStore blobStore;
-        if (revStore instanceof BlobStore) {
+        //if (revStore instanceof BlobStore) {
+        if (false) {
             blobStore = (BlobStore) revStore;
         } else {
             blobStore = new FileBlobStore(new File(home, "blobs").getCanonicalPath());
@@ -94,7 +95,7 @@ public class Repository {
         if (!initialized) {
             throw new IllegalStateException("not initialized");
         }
-        return pm.getHeadCommit().getId();
+        return pm.getHeadCommitId();
     }
 
     public Commit getHeadCommit() throws Exception {

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/PersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/PersistenceManager.java?rev=1162863&r1=1162862&r2=1162863&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/PersistenceManager.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/PersistenceManager.java
Mon Aug 29 15:26:15 2011
@@ -93,6 +93,14 @@ public class PersistenceManager {
         return revStore.put(commit.toBytes());
     }
 
+    public String getHeadCommitId() throws Exception {
+        if (!initialized) {
+            throw new IllegalStateException("not initialized");
+        }
+
+        return revStore.getHeadId();
+    }
+
     public Commit getHeadCommit() throws Exception {
         if (!initialized) {
             throw new IllegalStateException("not initialized");



Mime
View raw message