directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1187466 [2/2] - in /directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core: log/ txn/ txn/logedit/
Date Fri, 21 Oct 2011 17:01:35 GMT
Modified: directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/ReadOnlyTxn.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/ReadOnlyTxn.java?rev=1187466&r1=1187465&r2=1187466&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/ReadOnlyTxn.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/ReadOnlyTxn.java
Fri Oct 21 17:01:34 2011
@@ -19,6 +19,10 @@
  */
 package org.apache.directory.server.core.txn;
 
+/**
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
 class ReadOnlyTxn<ID> extends AbstractTransaction<ID>
 {
    

Modified: directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/ReadWriteTxn.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/ReadWriteTxn.java?rev=1187466&r1=1187465&r2=1187466&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/ReadWriteTxn.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/ReadWriteTxn.java
Fri Oct 21 17:01:34 2011
@@ -52,6 +52,10 @@ import org.apache.directory.shared.ldap.
 
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 
+/**
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
 class ReadWriteTxn<ID> extends AbstractTransaction<ID>
 {  
     /** list of log edits by the txn */
@@ -80,19 +84,22 @@ class ReadWriteTxn<ID> extends AbstractT
       
     public AtomicInteger getRefCount()
     {
-        return this.txnRefCount;
+        return txnRefCount;
     }
     
+    
     public UserLogRecord getUserLogRecord()
     {
         return logRecord;
     }
     
+    
     public List<LogEdit<ID>> getEdits()
     {
         return logEdits;
     }
     
+    
     @SuppressWarnings("unchecked")
     public void addLogEdit( LogEdit<ID> edit )
     {
@@ -108,7 +115,7 @@ class ReadWriteTxn<ID> extends AbstractT
             Iterator<DataChange<ID>> it = dataChanges.iterator();
             Dn partitionDn = dEdit.getPartitionDn();
             
-            DataChange<ID> nextChange;            
+            DataChange<ID> nextChange;
             IndexChange<ID> indexChange;
             IndexChange.Type indexChangeType;
             ForwardIndexEntry<Object,ID> indexEntry;
@@ -139,9 +146,10 @@ class ReadWriteTxn<ID> extends AbstractT
                 indexDeletes.put( partitionDn, deletedIndices );
             }
             
-            while( it.hasNext() )
+            while ( it.hasNext() )
             {
                 nextChange = it.next();
+                
                 if ( nextChange instanceof IndexChange )
                 {
                     indexChange = (IndexChange<ID>) nextChange;
@@ -166,13 +174,13 @@ class ReadWriteTxn<ID> extends AbstractT
                     }
                     
                     TreeSet<IndexEntry<Object,ID>> deletes = deletedIndices.get(
indexChange.getOID() );
+                    
                     if ( deletes == null )
                     {
                         deletes = new TreeSet<IndexEntry<Object,ID>>( index.getForwardIndexEntryComparator()
);
                         deletedIndices.put( indexChange.getOID(), deletes );
                     }
                     
-                    
                     indexEntry = new ForwardIndexEntry<Object,ID>();
                     indexEntry.setValue( indexChange.getKey() );
                     indexEntry.setId( indexChange.getID() );
@@ -191,10 +199,10 @@ class ReadWriteTxn<ID> extends AbstractT
                     }
                 }
             }
-            
         } 
     }
     
+    
     public Entry applyUpdatesToEntry( Dn partitionDn, ID entryID, Entry curEntry, boolean
cloneOnChange )
     {
         boolean needToCloneOnChange = cloneOnChange;
@@ -231,6 +239,7 @@ class ReadWriteTxn<ID> extends AbstractT
                     if ( curEntry!= null )
                     {
                         String curUuid = null;  
+                        
                         try
                         {
                             curUuid = curEntry.get( SchemaConstants.ENTRY_UUID_AT ).getString();
@@ -247,12 +256,12 @@ class ReadWriteTxn<ID> extends AbstractT
                     else
                     {
                         Comparator<ID> idComp = TxnManagerFactory.<ID>txnManagerInstance().getIDComparator();
+                        
                         if ( partitionDn.equals( container.getPartitionDn() ) &&
 ( idComp.compare( entryID, container.getEntryID() ) == 0 ))
                         {
                             applyChanges = true;
                         }
                     }
-                    
                 }
                 
                 if ( applyChanges )
@@ -264,7 +273,8 @@ class ReadWriteTxn<ID> extends AbstractT
                     while ( dit.hasNext() )
                     {
                         nextChange = dit.next();
-                        if ( nextChange instanceof EntryChange && ( curEntry != null
) )
+                        
+                        if ( ( nextChange instanceof EntryChange ) && ( curEntry
!= null ) )
                         {
                             EntryChange<ID> entryChange = (EntryChange<ID>)nextChange;
                            
@@ -274,7 +284,6 @@ class ReadWriteTxn<ID> extends AbstractT
                                 needToCloneOnChange = false;
                             }
                             
-                            
                             try
                             {
                                 AttributeUtils.applyModification(curEntry, entryChange.getRedoChange());
@@ -305,7 +314,6 @@ class ReadWriteTxn<ID> extends AbstractT
         }
         
         return curEntry;
-        
     }
     
     
@@ -313,7 +321,6 @@ class ReadWriteTxn<ID> extends AbstractT
     {
         Map<String, TreeSet< IndexEntry<Object,ID>>> deletedIndices = 
             indexDeletes.get( partitionDn ); 
-
         
         if ( deletedIndices != null )
         {
@@ -321,8 +328,6 @@ class ReadWriteTxn<ID> extends AbstractT
         }
        
         return false;
-
-        
     }
     
     
@@ -344,7 +349,5 @@ class ReadWriteTxn<ID> extends AbstractT
         }
         
         return txnIndexCursor;
-        
     }
-    
 }

Modified: directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/Transaction.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/Transaction.java?rev=1187466&r1=1187465&r2=1187466&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/Transaction.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/Transaction.java
Fri Oct 21 17:01:34 2011
@@ -25,23 +25,27 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.name.Dn;
 
 
-interface Transaction<ID>
+/**
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+/** Package protected */ interface Transaction<ID>
 {
-    public List<ReadWriteTxn<ID>> getTxnsToCheck();
+    List<ReadWriteTxn<ID>> getTxnsToCheck();
     
-    public long getStartTime();
+    long getStartTime();
     
-    public void startTxn( long startTime );
+    void startTxn( long startTime );
     
-    public void commitTxn( long commitTime );
+    void commitTxn( long commitTime );
     
-    public long getCommitTime();
+    long getCommitTime();
     
-    public void abortTxn();
+    void abortTxn();
     
-    public State getState();
+    State getState();
     
-    public Entry mergeUpdates( Dn partitionDn, ID entryID, Entry entry );
+    Entry mergeUpdates( Dn partitionDn, ID entryID, Entry entry );
     
     enum State
     {
@@ -50,5 +54,4 @@ interface Transaction<ID>
         COMMIT,
         ABORT   
     }
-
 }

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=1187466&r1=1187465&r2=1187466&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
Fri Oct 21 17:01:34 2011
@@ -31,6 +31,10 @@ import org.apache.directory.shared.ldap.
 import java.util.Iterator;
 import java.util.NavigableSet;
 
+/**
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
 public class TxnIndexCursor <ID> extends AbstractIndexCursor<Object, Entry, ID>
 {
     /** list of changed index entries */
@@ -49,7 +53,7 @@ public class TxnIndexCursor <ID> extends
     private Iterator<IndexEntry<Object,ID>> it;
     
     /** currently available value */
-    IndexEntry<Object,ID> availableValue;
+    private IndexEntry<Object,ID> availableValue;
     
     /** unsupported operation message */
     private static final String UNSUPPORTED_MSG = I18n.err( I18n.ERR_722 );
@@ -79,13 +83,6 @@ public class TxnIndexCursor <ID> extends
             onlyKey = true;
         }
         
-        
-        if ( onlyValueKey != null )
-        {
-            this.onlyValueKey = onlyValueKey;
-            onlyKey = true;
-        }
-        
         if ( changedEntries.size()  < 1 )
         {
             throw new IllegalArgumentException("TxnIndexCursor should not be constructed
with no index  changes");
@@ -121,6 +118,7 @@ public class TxnIndexCursor <ID> extends
         }
         
         boolean skipKey = false;
+        
         if  ( forwardIndex )
         {
             if ( element.getId() == null )
@@ -140,9 +138,9 @@ public class TxnIndexCursor <ID> extends
         { 
             it = changedEntries.tailSet( element, false ).iterator();
             
-            
             boolean useLastEntry = false;
             IndexEntry<Object,ID> indexEntry = null;
+            
             while ( it.hasNext() )
             {
                 indexEntry = it.next();
@@ -181,6 +179,7 @@ public class TxnIndexCursor <ID> extends
         }
     }
     
+    
     /**
      * {@inheritDoc}
      */
@@ -220,7 +219,7 @@ public class TxnIndexCursor <ID> extends
         ForwardIndexEntry<Object,ID> indexEntry = new ForwardIndexEntry<Object,ID>();
         indexEntry.setId( id );
         indexEntry.setValue( value );
-        this.after( indexEntry );
+        after( indexEntry );
     }
 
 
@@ -232,9 +231,9 @@ public class TxnIndexCursor <ID> extends
         ForwardIndexEntry<Object,ID> indexEntry = new ForwardIndexEntry<Object,ID>();
         indexEntry.setId( id );
         indexEntry.setValue( value );
-        this.before( indexEntry );
+        before( indexEntry );
     }
-   
+    
     
     /**
      * {@inheritDoc}
@@ -248,6 +247,7 @@ public class TxnIndexCursor <ID> extends
         if ( onlyKey )
         {
             ForwardIndexEntry<Object,ID> indexEntry = new ForwardIndexEntry<Object,ID>();
+            
             if ( forwardIndex )
             {
                 indexEntry.setValue( onlyValueKey );
@@ -263,7 +263,6 @@ public class TxnIndexCursor <ID> extends
         {
             it = changedEntries.iterator();
         }
-        
     }
 
 
@@ -276,10 +275,10 @@ public class TxnIndexCursor <ID> extends
         availableValue = null;
         movingNext = false;
         
-        
         if ( onlyKey )
         {
             IndexEntry<Object,ID> indexEntry = new ForwardIndexEntry<Object,ID>();
+            
             if ( forwardIndex )
             {
                 indexEntry.setValue( onlyValueKey );
@@ -293,6 +292,7 @@ public class TxnIndexCursor <ID> extends
             
             
             boolean useLastEntry = false;
+            
             while ( it.hasNext() )
             {
                 indexEntry = it.next();
@@ -329,25 +329,30 @@ public class TxnIndexCursor <ID> extends
             it = changedEntries.descendingIterator();
         }
     }
+    
 
     /**
      * {@inheritDoc}
      */
     public boolean first() throws Exception
     {
-        this.beforeFirst();
-        return this.next();
+        beforeFirst();
+        
+        return next();
     }
+    
 
     /**
      * {@inheritDoc}
      */
     public boolean last() throws Exception
     {
-        this.afterLast();
-        return this.previous();
+        afterLast();
+        
+        return previous();
     }
     
+    
     /**
      * {@inheritDoc}
      */
@@ -392,6 +397,7 @@ public class TxnIndexCursor <ID> extends
                     if ( comparator.getValueComparator().compare( availableValue.getValue(),
onlyValueKey ) != 0 )
                     {
                         availableValue = null;
+                        
                         return false;
                     }
                 }
@@ -400,6 +406,7 @@ public class TxnIndexCursor <ID> extends
                     if ( comparator.getIDComparator().compare( availableValue.getId(), onlyIDKey
) != 0 )
                     {
                         availableValue = null;
+                        
                         return false;
                     }
                 }
@@ -410,9 +417,11 @@ public class TxnIndexCursor <ID> extends
         else
         {
             availableValue = null;
+            
             return false;
         }
     }
+    
 
     /**
      * {@inheritDoc}
@@ -459,6 +468,7 @@ public class TxnIndexCursor <ID> extends
                     if ( comparator.getValueComparator().compare( availableValue.getValue(),
onlyValueKey ) != 0 )
                     {
                         availableValue = null;
+                        
                         return false;
                     }
                 }
@@ -467,6 +477,7 @@ public class TxnIndexCursor <ID> extends
                     if ( comparator.getIDComparator().compare( availableValue.getId(), onlyIDKey
) != 0 )
                     {
                         availableValue = null;
+                        
                         return false;
                     }
                 }
@@ -477,10 +488,12 @@ public class TxnIndexCursor <ID> extends
         else
         {
             availableValue = null;
+            
             return false;
         }
     }
     
+    
     /**
      * {@inheritDoc}
      */
@@ -494,6 +507,7 @@ public class TxnIndexCursor <ID> extends
         throw new InvalidCursorPositionException();
     }
     
+    
     /**
      * {@inheritDoc}
      */
@@ -501,5 +515,4 @@ public class TxnIndexCursor <ID> extends
     {
         return UNSUPPORTED_MSG;
     }
-
 }

Modified: directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/TxnManagerFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/TxnManagerFactory.java?rev=1187466&r1=1187465&r2=1187466&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/TxnManagerFactory.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/TxnManagerFactory.java
Fri Oct 21 17:01:34 2011
@@ -22,14 +22,17 @@ package org.apache.directory.server.core
 import java.util.Comparator;
 import org.apache.directory.server.core.api.partition.index.Serializer;
 
+/**
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
 public class TxnManagerFactory
 {
     private static TxnManagerInternal<?> txnManager;
     
     private static TxnLogManager<?> txnLogManager;
     
-    public static <ID> void 
-        init(Comparator<ID> idComparator, Serializer idSerializer)
+    public static <ID> void init(Comparator<ID> idComparator, Serializer idSerializer)
     {
         DefaultTxnManager<ID> dTxnManager;
         dTxnManager = new DefaultTxnManager<ID>();
@@ -50,11 +53,13 @@ public class TxnManagerFactory
         return ( (TxnManager<ID>) txnManager );
     }
     
+    
     public static <ID> TxnLogManager<ID> txnLogManagerInstance()
     {
         return ( (TxnLogManager<ID>) txnLogManager );
     }
     
+    
     static <ID> TxnManagerInternal<ID> txnManagerInternalInstance()
     {
         return ( (TxnManagerInternal<ID>) txnManager );

Modified: directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/TxnManagerInternal.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/TxnManagerInternal.java?rev=1187466&r1=1187465&r2=1187466&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/TxnManagerInternal.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/TxnManagerInternal.java
Fri Oct 21 17:01:34 2011
@@ -19,7 +19,11 @@
  */
 package org.apache.directory.server.core.txn;
 
+/**
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
 public interface TxnManagerInternal<ID> extends TxnManager<ID>
 {
-    public Transaction<ID> getCurTxn();
+    Transaction<ID> getCurTxn();
 }

Modified: directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/logedit/DataChangeContainer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/logedit/DataChangeContainer.java?rev=1187466&r1=1187465&r2=1187466&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/logedit/DataChangeContainer.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/logedit/DataChangeContainer.java
Fri Oct 21 17:01:34 2011
@@ -33,6 +33,10 @@ import org.apache.directory.server.core.
 
 import org.apache.directory.server.core.txn.TxnManagerFactory;
 
+/**
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
 public class DataChangeContainer<ID> extends AbstractLogEdit<ID>
 {
     /** Set to the uuid of the entry if the container contains a change for the entry, null
otherwise */
@@ -62,36 +66,43 @@ public class DataChangeContainer<ID> ext
         this.txnID = txnID;
     }
     
+    
     public String getUUID()
     {
         return uuid;
     }
     
+    
     public void setUUID( String entryUUID )
     {
         this.uuid = entryUUID;
     }
     
+    
     public long getTxnID()
     {
-        return this.txnID;
+        return txnID;
     }
     
+    
     public Dn getPartitionDn()
     {
         return partitionDn;
     }
     
+    
     public ID getEntryID()
     {
         return entryID;
     }
     
+    
     public List<DataChange<ID>> getChanges()
     {
         return changes;
     }
     
+    
     @Override
     public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
     {
@@ -104,6 +115,7 @@ public class DataChangeContainer<ID> ext
         }
         
         int len = in.readInt(); 
+        
         if ( len < 0 )
         {
             entryID = null;
@@ -120,7 +132,6 @@ public class DataChangeContainer<ID> ext
         partitionDn = new Dn();
         partitionDn.readExternal( in );
         
-        
         DataChange<ID> change;
         int numChanges = in.readInt();
         
@@ -138,7 +149,6 @@ public class DataChangeContainer<ID> ext
         Serializer idSerializer = TxnManagerFactory.txnManagerInstance().getIDSerializer();
         DataChange<ID> change;
         
-        
         if ( uuid != null )
         {
             out.writeBoolean( true );
@@ -174,5 +184,4 @@ public class DataChangeContainer<ID> ext
             change.writeExternal( out );
         }
     }
-
 }

Modified: directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/logedit/EntryAddDelete.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/logedit/EntryAddDelete.java?rev=1187466&r1=1187465&r2=1187466&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/logedit/EntryAddDelete.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/logedit/EntryAddDelete.java
Fri Oct 21 17:01:34 2011
@@ -26,6 +26,10 @@ import java.io.ObjectOutput;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 
+/**
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
 public class EntryAddDelete<ID> extends AbstractDataChange<ID>
 {
     /** Added or deleted entry */
@@ -46,16 +50,19 @@ public class EntryAddDelete<ID> extends 
         this.type = type;
     }
     
+    
     public Entry getChangedEntry()
     {
         return entry;
     }
     
+    
     public Type getType()
     {
         return type;
     }
     
+    
     @Override
     public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
     {
@@ -77,5 +84,4 @@ public class EntryAddDelete<ID> extends 
         ADD,
         DELETE
     }
-    
 }

Modified: directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/logedit/EntryChange.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/logedit/EntryChange.java?rev=1187466&r1=1187465&r2=1187466&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/logedit/EntryChange.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/logedit/EntryChange.java
Fri Oct 21 17:01:34 2011
@@ -26,6 +26,10 @@ import java.io.ObjectOutput;
 import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.DefaultModification;
 
+/**
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
 public class EntryChange<ID> extends AbstractDataChange<ID>
 {
     /** redo change */
@@ -37,7 +41,6 @@ public class EntryChange<ID> extends Abs
     //For externalizable
     public EntryChange()
     {
-        
     }
     
     public EntryChange( Modification redo, Modification undo )
@@ -46,16 +49,19 @@ public class EntryChange<ID> extends Abs
         undoChange = undo;
     }
     
+    
     public Modification getRedoChange()
     {
         return redoChange;
     }
     
+    
     public Modification getUndoChange()
     {
         return undoChange;
     }
     
+    
     @Override
     public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
     {
@@ -76,5 +82,4 @@ public class EntryChange<ID> extends Abs
         redoChange.writeExternal( out );
         undoChange.writeExternal( out );
     }
-    
 }

Modified: directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/logedit/IndexChange.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/logedit/IndexChange.java?rev=1187466&r1=1187465&r2=1187466&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/logedit/IndexChange.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/logedit/IndexChange.java
Fri Oct 21 17:01:34 2011
@@ -29,6 +29,10 @@ import org.apache.directory.server.core.
 
 import org.apache.directory.shared.ldap.model.entry.Value;
 
+/**
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
 public class IndexChange<ID> extends AbstractDataChange<ID>
 {
     /** Index this change is done on */
@@ -49,7 +53,6 @@ public class IndexChange<ID> extends Abs
     // For externalizable
     public IndexChange()
     {
-        
     }
     
     public IndexChange( Index<?, ?, ID> index, String oid, Value<?> key, ID id,
Type type )
@@ -64,9 +67,10 @@ public class IndexChange<ID> extends Abs
     
     public String getOID()
     {
-        return this.oid;
+        return oid;
     }
     
+    
     public Index<?, ?, ID> getIndex()
     {
         return index;
@@ -78,16 +82,19 @@ public class IndexChange<ID> extends Abs
         return key;
     }
     
+    
     public ID getID()
     {
         return id;
     }
     
+    
     public Type getType()
     {
         return type;
     }
     
+    
     @Override
     @SuppressWarnings("unchecked")
     public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
@@ -122,12 +129,9 @@ public class IndexChange<ID> extends Abs
     }
     
     
-    
     public enum Type
     {
         ADD,
         DELETE
     }
-    
-    
 }

Modified: directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/logedit/TxnStateChange.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/logedit/TxnStateChange.java?rev=1187466&r1=1187465&r2=1187466&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/logedit/TxnStateChange.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core/src/main/java/org/apache/directory/server/core/txn/logedit/TxnStateChange.java
Fri Oct 21 17:01:34 2011
@@ -23,6 +23,10 @@ import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 
+/**
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
 public class TxnStateChange<ID> extends AbstractLogEdit<ID>
 {
     /** ID of the txn associated with this change */
@@ -36,25 +40,28 @@ public class TxnStateChange<ID> extends 
     // For deserialization
     public TxnStateChange()
     {
-        
     }
     
+    
     public TxnStateChange( long txnID, State txnState )
     {
         this.txnID = txnID;
         this.txnState = txnState;
     }
     
+    
     public long getTxnID()
     {
-        return this.txnID;
+        return txnID;
     }
     
+    
     public State getTxnState()
     {
-        return this.txnState;
+        return txnState;
     }
     
+    
     @Override
     public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
     {
@@ -70,11 +77,11 @@ public class TxnStateChange<ID> extends 
         out.writeInt( txnState.ordinal() );
     }
     
+    
     public enum State
     {
         TXN_BEGIN,
         TXN_COMMIT,
         TXN_ABORT
     }
-
 }



Mime
View raw message