You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2010/01/24 14:03:42 UTC

svn commit: r902560 - /directory/apacheds/trunk/jdbm/src/main/java/jdbm/recman/RecordFile.java

Author: akarasulu
Date: Sun Jan 24 13:03:41 2010
New Revision: 902560

URL: http://svn.apache.org/viewvc?rev=902560&view=rev
Log:
all formatting

Modified:
    directory/apacheds/trunk/jdbm/src/main/java/jdbm/recman/RecordFile.java

Modified: directory/apacheds/trunk/jdbm/src/main/java/jdbm/recman/RecordFile.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm/src/main/java/jdbm/recman/RecordFile.java?rev=902560&r1=902559&r2=902560&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm/src/main/java/jdbm/recman/RecordFile.java (original)
+++ directory/apacheds/trunk/jdbm/src/main/java/jdbm/recman/RecordFile.java Sun Jan 24 13:03:41 2010
@@ -65,8 +65,7 @@
 {
     final TransactionManager txnMgr;
 
-    // Todo: reorganize in hashes and fifos as necessary.
-    // free -> inUse -> dirty -> inTxn -> free
+    // state transitions: free -> inUse -> dirty -> inTxn -> free
     // free is a cache, thus a FIFO. The rest are hashes.
     private final LinkedList<BlockIo> free = new LinkedList<BlockIo>();
     private final HashMap<Long,BlockIo> inUse = new HashMap<Long,BlockIo>();
@@ -448,7 +447,7 @@
      */
     void releaseFromTransaction( BlockIo node, boolean recycle ) throws IOException 
     {
-        if ( (inTxn.remove( node.getBlockId() ) != null ) && recycle ) 
+        if ( ( inTxn.remove( node.getBlockId() ) != null ) && recycle ) 
         {
             free.add( node );
         }
@@ -467,7 +466,7 @@
     /**
      * Utility method: Read a block from a RandomAccessFile
      */
-    private static void read( RandomAccessFile file, long offset, byte[] buffer, int nBytes) throws IOException 
+    private static void read( RandomAccessFile file, long offset, byte[] buffer, int nBytes ) throws IOException 
     {
         file.seek( offset );
         int remaining = nBytes;