directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1227696 - in /directory/apacheds/branches/apacheds-txns/core-api/src: main/java/org/apache/directory/server/core/api/interceptor/context/ main/java/org/apache/directory/server/core/api/log/ main/java/org/apache/directory/server/core/api/tx...
Date Thu, 05 Jan 2012 17:02:07 GMT
Author: akarasulu
Date: Thu Jan  5 17:02:06 2012
New Revision: 1227696

URL: http://svn.apache.org/viewvc?rev=1227696&view=rev
Log:
typos, spelling, formatting, and small warning fixes in eclipse while looking at this code.

Modified:
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/OperationContext.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/InvalidLogException.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/Log.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/LogAnchor.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/LogAnchorComparator.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/LogScanner.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/UserLogRecord.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/txn/TxnConflictException.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/txn/TxnLogManager.java
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/txn/TxnManager.java
    directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockDirectoryService.java

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/OperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/OperationContext.java?rev=1227696&r1=1227695&r2=1227696&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/OperationContext.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/interceptor/context/OperationContext.java
Thu Jan  5 17:02:06 2012
@@ -25,6 +25,7 @@ import java.util.List;
 import org.apache.directory.server.core.api.CoreSession;
 import org.apache.directory.server.core.api.LdapPrincipal;
 import org.apache.directory.server.core.api.entry.ClonedServerEntry;
+import org.apache.directory.server.core.api.interceptor.Interceptor;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.message.Control;
@@ -32,7 +33,7 @@ import org.apache.directory.shared.ldap.
 
 
 /**
- * This interface represent the context passed as an argument to each interceptor.
+ * This interface represent the context passed as an argument to each {@link Interceptor}
operation.
  * It will contain data used by all the operations.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/InvalidLogException.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/InvalidLogException.java?rev=1227696&r1=1227695&r2=1227696&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/InvalidLogException.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/InvalidLogException.java
Thu Jan  5 17:02:06 2012
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.server.core.api.log;
 
+
 /** 
  * An exception used when the log content could be invalid.
  *
@@ -29,11 +30,15 @@ public class InvalidLogException extends
     /** The serial version UID */
     private static final long serialVersionUID = 1L;
 
+    
     /**
      * Creates a new instance of InvalidLogException 
      */
-    public InvalidLogException() {}
+    public InvalidLogException() 
+    {
+    }
 
+    
     /**
      * Creates a new instance of InvalidLogException with a message
      * 

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/Log.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/Log.java?rev=1227696&r1=1227695&r2=1227696&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/Log.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/Log.java
Thu Jan  5 17:02:06 2012
@@ -19,12 +19,13 @@
  */
 package org.apache.directory.server.core.api.log;
 
+
 import java.io.IOException;
 
+
 /**
  * An interface for the Log sub-system.<br/>
- * The log subsystem is used to log some records on disk, allowing the users to read back
them
- * if needed.
+ * The log subsystem is used to log any kind of record on disk, allowing records to be read
back if needed.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
@@ -81,10 +82,11 @@ public interface Log
     
     
     /**
-     * Syncs the log upto the given lsn. If lsn is equal to unknow lsn, then the log is 
-     * flushed upto the latest logged lsn.
+     * Synchronizes the log up to the given LSN. If LSN is equal to unknown 
+     * LSN, then the log is flushed up to the latest logged LSN.
      *
-     * @param uptoLSN lsn to flush upto. Unkown lsn if caller just wants to sync the log
upto the latest logged lsn.
+     * @param uptoLSN LSN to flush up to. Unknown LSN if caller just wants to 
+     * sync the log up to the latest logged LSN.
      * @throws IOException If we can't flush the data on disk
      * @throws InvalidLogException If the log contains some bad records
      */

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/LogAnchor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/LogAnchor.java?rev=1227696&r1=1227695&r2=1227696&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/LogAnchor.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/LogAnchor.java
Thu Jan  5 17:02:06 2012
@@ -19,10 +19,13 @@
  */
 package org.apache.directory.server.core.api.log;
 
+
 import org.apache.directory.server.i18n.I18n;
 
+
 /**
- * Implements a pointer in to the log files
+ * Implements a pointer in to the log files.
+ * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public class LogAnchor

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/LogAnchorComparator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/LogAnchorComparator.java?rev=1227696&r1=1227695&r2=1227696&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/LogAnchorComparator.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/LogAnchorComparator.java
Thu Jan  5 17:02:06 2012
@@ -19,18 +19,21 @@
  */
 package org.apache.directory.server.core.api.log;
 
+
 import java.util.Comparator;
 
 import org.apache.directory.server.i18n.I18n;
 
+
 /**
+ * A {@link Comparator} that compares {@link LogAnchor} objects.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public class LogAnchorComparator implements Comparator<LogAnchor>
 {
     /**
-     * Compare two log anchors.
+     * Compare two {@link LogAnchor} objects.
      *
      * @param obj1 First object
      * @param obj2 Second object
@@ -39,11 +42,13 @@ public class LogAnchorComparator impleme
      */
      public int compare( LogAnchor obj1, LogAnchor obj2 )
      {
-        if ( obj1 == null ) {
+        if ( obj1 == null ) 
+        {
             throw new IllegalArgumentException( I18n.err( I18n.ERR_525 ) );
         }
 
-        if ( obj2 == null ) {
+        if ( obj2 == null ) 
+        {
             throw new IllegalArgumentException( I18n.err( I18n.ERR_526 ) );
         }
 

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/LogScanner.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/LogScanner.java?rev=1227696&r1=1227695&r2=1227696&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/LogScanner.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/LogScanner.java
Thu Jan  5 17:02:06 2012
@@ -19,20 +19,22 @@
  */
 package org.apache.directory.server.core.api.log;
 
+
 import java.io.IOException;
 
+
 /**
- * A utility class used to scan a Log file. We can only rea records forward,
- * there is no way we can go backward. In order to start to read logs from
- * a given position, the user must have set this position when requesting
- * for a LogScanner (@see Log#beginScan(LogAnchor))
+ * A utility class used to scan a Log file. We can only advance the scanner 
+ * forward, there is no way we can advance backward. In order to start to read
+ * log records from a given position, the user must specify the start position 
+ * when requesting a new LogScanner (@see Log#beginScan(LogAnchor))
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public interface LogScanner
 {
     /**
-     * Reads and returns the next user record from the log into a backing byte array 
+     * Reads and returns the next user record from the log into a byte array
      * and returns a reference to it. Returned array can be overwritten 
      * after the next call to getNextRecord()
      *

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/UserLogRecord.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/UserLogRecord.java?rev=1227696&r1=1227695&r2=1227696&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/UserLogRecord.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/log/UserLogRecord.java
Thu Jan  5 17:02:06 2012
@@ -19,8 +19,9 @@
  */
 package org.apache.directory.server.core.api.log;
 
+
 /** 
- * A user log record that can be used to pass user record between the clients and the logger
+ * A user log record that can be used to pass user record between the clients and the logger.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/txn/TxnConflictException.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/txn/TxnConflictException.java?rev=1227696&r1=1227695&r2=1227696&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/txn/TxnConflictException.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/txn/TxnConflictException.java
Thu Jan  5 17:02:06 2012
@@ -27,7 +27,10 @@ package org.apache.directory.server.core
  */
 public class TxnConflictException extends Exception
 {
-    public TxnConflictException()
+	private static final long serialVersionUID = -339941830264899889L;
+
+
+	public TxnConflictException()
     {
     }
 

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/txn/TxnLogManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/txn/TxnLogManager.java?rev=1227696&r1=1227695&r2=1227696&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/txn/TxnLogManager.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/txn/TxnLogManager.java
Thu Jan  5 17:02:06 2012
@@ -36,6 +36,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.name.Dn;
 
 
+
 /**
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -77,7 +78,7 @@ public interface TxnLogManager
 
     /**
      * Checks all the updates done on the given index for the given key and returns 
-     * the latest version of the coressponding id
+     * the latest version of the corresponding id
      *
      * @param partitionDN dn of the partition the entry lives in
      * @param attributeOid oid of the indexed attribute
@@ -91,7 +92,7 @@ public interface TxnLogManager
 
     /**
      * Checks all the updates done on the given index for the given id and returns 
-     * the latest version of the corressponding value
+     * the latest version of the corresponding value
      *
      * @param partitionDN dn of the partition the entry lives in
      * @param attributeOid oid of the indexed attribute
@@ -130,6 +131,7 @@ public interface TxnLogManager
         String attributeOid, boolean forwardIndex, Object onlyValueKey, UUID onlyIDKey )
throws Exception;
 
 
+    
     /**
      * Returns an index which a provides a transactionally consistent view over the given
index
      *

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/txn/TxnManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/txn/TxnManager.java?rev=1227696&r1=1227695&r2=1227696&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/txn/TxnManager.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/txn/TxnManager.java
Thu Jan  5 17:02:06 2012
@@ -21,7 +21,10 @@ package org.apache.directory.server.core
 
 
 /**
+ * The transaction manager interface.
  * 
+ * @TODO Don't we have this interface available in the transaction API? why are
+ *       we recreating this when we can reuse? 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public interface TxnManager
@@ -34,10 +37,11 @@ public interface TxnManager
     TxnHandle beginTransaction( boolean readOnly ) throws Exception;
 
 
+    
     /**
      * Tries to commit the current txn associated with the current thread. ReadWrite txns
have to be verified against txns
      * that committed after they started for any conflicting change and conflicting
-     * exception is thrown if verificatin fails.
+     * exception is thrown if verification fails.
      *
      * @throws Exception
      * @throws TxnConflictException
@@ -45,6 +49,7 @@ public interface TxnManager
     void commitTransaction() throws Exception, TxnConflictException;
 
 
+    
     /**
      * Aborts the current txn associated with the current thread.
      *

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockDirectoryService.java?rev=1227696&r1=1227695&r2=1227696&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockDirectoryService.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/test/java/org/apache/directory/server/core/api/MockDirectoryService.java
Thu Jan  5 17:02:06 2012
@@ -232,7 +232,7 @@ public class MockDirectoryService implem
 
     public List<Interceptor> getInterceptors()
     {
-        return Collections.EMPTY_LIST;
+        return Collections.emptyList();
     }
 
 



Mime
View raw message