jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1406676 - /jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/blobs/AbstractBlobStore.java
Date Wed, 07 Nov 2012 15:30:26 GMT
Author: thomasm
Date: Wed Nov  7 15:30:25 2012
New Revision: 1406676

URL: http://svn.apache.org/viewvc?rev=1406676&view=rev
Log:
OAK-123 Data store improvements

Modified:
    jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/blobs/AbstractBlobStore.java

Modified: jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/blobs/AbstractBlobStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/blobs/AbstractBlobStore.java?rev=1406676&r1=1406675&r2=1406676&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/blobs/AbstractBlobStore.java
(original)
+++ jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/blobs/AbstractBlobStore.java
Wed Nov  7 15:30:25 2012
@@ -218,6 +218,17 @@ public abstract class AbstractBlobStore 
         in.close();
     }
 
+    /**
+     * Store a block of data.
+     * 
+     * @param digest the content hash
+     * @param level the indirection level (0 is for user data, 1 is a list of
+     *            digests that point to user data, 2 is a list of digests that
+     *            point to digests, and so on). This parameter is for
+     *            informational use only, and it is not required to store it
+     *            unless that's easy to achieve
+     * @param data the data to be stored
+     */
     protected abstract void storeBlock(byte[] digest, int level, byte[] data) throws Exception;
 
     public abstract void startMark() throws Exception;
@@ -421,6 +432,14 @@ public abstract class AbstractBlobStore 
         public String toString() {
             return StringUtils.convertBytesToHex(digest) + "@" + pos;
         }
+        
+        public byte[] getDigest() {
+            return digest;
+        }
+        
+        public long getPos() {
+            return pos;
+        }
 
     }
 



Mime
View raw message