directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1189647 - in /directory/apacheds/branches/apacheds-txns/core/src: main/java/org/apache/directory/server/core/log/ main/java/org/apache/directory/server/core/txn/ test/java/org/apache/directory/server/core/log/
Date Thu, 27 Oct 2011 07:28:53 GMT
Author: saya
Date: Thu Oct 27 07:28:53 2011
New Revision: 1189647

URL: http://svn.apache.org/viewvc?rev=1189647&view=rev
Log:
small code cleanup

Modified:
    directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/log/DefaultLogFileManager.java
    directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/log/LogFileManager.java
    directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/TxnIndexCursor.java
    directory/apacheds/branches/apacheds-txns/core/src/test/java/org/apache/directory/server/core/log/LogTest.java

Modified: directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/log/DefaultLogFileManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/log/DefaultLogFileManager.java?rev=1189647&r1=1189646&r2=1189647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/log/DefaultLogFileManager.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/log/DefaultLogFileManager.java
Thu Oct 27 07:28:53 2011
@@ -168,13 +168,11 @@ import java.io.RandomAccessFile;
         /**
          * {@inheritDoc}
          */
-        public int read( byte[] buffer, int offset, int length ) throws IOException, EOFException
+        public void read( byte[] buffer, int offset, int length ) throws IOException, EOFException
         {
             // carefully read all the bytes from disk. Don't use read(), as 
             // it does not span across blocks of data
             raf.readFully( buffer, offset, length );
-            
-            return length;
         }
         
         

Modified: directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/log/LogFileManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/log/LogFileManager.java?rev=1189647&r1=1189646&r2=1189647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/log/LogFileManager.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/log/LogFileManager.java
Thu Oct 27 07:28:53 2011
@@ -105,11 +105,10 @@ import java.io.FileNotFoundException;
          * @param buffer data destination
          * @param offset destination offset
          * @param length size of read
-         * @return number of bytes actually read.
          * @throws IOException If the read failed
          * @throws EOFException If the file does not contain enough data
          */
-        int read( byte[] buffer, int offset, int length ) throws IOException, EOFException;
+        void read( byte[] buffer, int offset, int length ) throws IOException, EOFException;
         
 
         /**

Modified: directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/TxnIndexCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/TxnIndexCursor.java?rev=1189647&r1=1189646&r2=1189647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/TxnIndexCursor.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/TxnIndexCursor.java
Thu Oct 27 07:28:53 2011
@@ -165,7 +165,7 @@ public class TxnIndexCursor <ID> extends
             
             if ( useLastEntry )
             {
-                it = changedEntries.tailSet( indexEntry, true ).descendingIterator();
+                it = changedEntries.tailSet( indexEntry, true ).iterator();
             }
             else
             {

Modified: directory/apacheds/branches/apacheds-txns/core/src/test/java/org/apache/directory/server/core/log/LogTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core/src/test/java/org/apache/directory/server/core/log/LogTest.java?rev=1189647&r1=1189646&r2=1189647&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core/src/test/java/org/apache/directory/server/core/log/LogTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core/src/test/java/org/apache/directory/server/core/log/LogTest.java
Thu Oct 27 07:28:53 2011
@@ -80,6 +80,7 @@ public class LogTest
         int dataLength = 1024;
         UserLogRecord userLogRecord = new UserLogRecord();
         byte recordData[] = new byte[dataLength];
+        LogAnchor startingLogAnchor = new LogAnchor();
         
         try
         {
@@ -92,7 +93,7 @@ public class LogTest
                 log.log( userLogRecord, false );
             }
             
-            LogScanner logScanner = log.beginScan();
+            LogScanner logScanner = log.beginScan( startingLogAnchor );
             int recordNumber = 0;
             
             while ( logScanner.getNextRecord( userLogRecord ) )



Mime
View raw message