directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r902560 - /directory/apacheds/trunk/jdbm/src/main/java/jdbm/recman/RecordFile.java
Date Sun, 24 Jan 2010 13:03:42 GMT
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;



Mime
View raw message