directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1196595 - in /directory/apacheds/branches/apacheds-txns: core-api/src/main/java/org/apache/directory/server/core/api/txn/ core-shared/src/test/java/org/apache/directory/server/core/interceptor/ core-shared/src/test/java/org/apache/director...
Date Wed, 02 Nov 2011 14:17:54 GMT
Author: saya
Date: Wed Nov  2 14:17:53 2011
New Revision: 1196595

URL: http://svn.apache.org/viewvc?rev=1196595&view=rev
Log:
complete code reorg for package moves and renames

Removed:
    directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/interceptor/
    directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/prefs/
    directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/security/
    directory/apacheds/branches/apacheds-txns/core/src/test/java/org/apache/directory/server/core/log/
    directory/apacheds/branches/apacheds-txns/core/src/test/java/org/apache/directory/server/core/txn/
Modified:
    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-shared/src/test/java/org/apache/directory/server/core/shared/log/LogFileManagerTest.java
    directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/log/LogFlushScanTest.java
    directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/log/LogTest.java
    directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/DefaultTxnManagerTest.java
    directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/EntryUpdateMergeTest.java
    directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/IndexCursorWrapperTest.java
    directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/LongComparator.java
    directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/LongSerializer.java
    directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/TxnConflicTest.java
    directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/TxnIndexCursorTest.java

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=1196595&r1=1196594&r2=1196595&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
Wed Nov  2 14:17:53 2011
@@ -37,15 +37,67 @@ import java.io.IOException;
  */
 public interface TxnLogManager<ID>
 {
+    /**
+     * Logs the given log edit for the txn associated with the current thread
+     *
+     * @param logEdit edit to be logged
+     * @param sync log edit will be flushed to media if set to true
+     * @throws IOException 
+     */
     void log( LogEdit<ID> logEdit, boolean sync ) throws IOException;
     
+    
+    /**
+     * Logs the given log record for the txn associated with the current thread
+     *
+     * @param logRecord log record to be logged
+     * @param sync log edit will be flushed to media if set to true
+     * @throws IOException 
+     */
     void log( UserLogRecord logRecord, boolean sync ) throws IOException;
     
+    /**
+     * Provide a transactionally consistent view on the entry identified
+     * by the partitionDn+entryID by applying the necessary updates from the txn log
+     * to the entry. 
+     *
+     * @param partitionDN dn of the partition the entry lives in
+     * @param entryID id of the entry
+     * @param entry current version of the entry the txn has
+     * @return
+     */
     Entry mergeUpdates(Dn partitionDN, ID entryID,  Entry entry );
     
+    /**
+     * Returns a cursor which provides a transactionally consistent view of the wrapped cursor.
+     *
+     * @param partitionDn dn of the partition the index lives in
+     * @param wrappedCursor cursor to be wrapped
+     * @param comparator comparator that should be used to order index entries
+     * @param attributeOid oid of the indexed attribute
+     * @param forwardIndex true if the cursor is for the forward index and false if for reverse
index
+     * @param onlyValueKey If cursor is forward index cursor and locked down by a value,
this parameter is set to that value
+     * @param onlyIDKey If cursor is forward index cursor and locked down by a ID, this parameter
is set to that ID
+     * @return a cursor which provides a transactionally consistent view of the wrapped cursor

+     * @throws Exception
+     */
     IndexCursor<Object, Entry, ID> wrap( Dn partitionDn, IndexCursor<Object, Entry,
ID> wrappedCursor, IndexComparator<Object,ID> comparator, String attributeOid, boolean
forwardIndex, Object onlyValueKey, ID onlyIDKey ) throws Exception;
     
+    /**
+     * Adds a dn and a scope on which the current txn depens
+     *
+     * @param baseDn base dn
+     * @param scope scope of the dependency
+     */
     void addRead( Dn baseDn, SearchScope scope );
     
+    
+    /**
+     * Adds a dn and a scope which the current txn affected through
+     * a modification
+     *
+     * @param baseDn base dn
+     * @param scope scope of the dn set affected by the change.
+     */
     void addWrite( Dn baseDn, SearchScope scope );
 }

Modified: directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/log/LogFileManagerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/log/LogFileManagerTest.java?rev=1196595&r1=1196594&r2=1196595&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/log/LogFileManagerTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/log/LogFileManagerTest.java
Wed Nov  2 14:17:53 2011
@@ -17,15 +17,15 @@
  *  under the License.
  *
  */
-package org.apache.directory.server.core.log;
+package org.apache.directory.server.core.shared.log;
 
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.util.Arrays;
 
-import org.apache.directory.server.core.log.LogFileManager.LogFileReader;
-import org.apache.directory.server.core.log.LogFileManager.LogFileWriter;
+import org.apache.directory.server.core.shared.log.LogFileManager.LogFileReader;
+import org.apache.directory.server.core.shared.log.LogFileManager.LogFileWriter;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;

Modified: directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/log/LogFlushScanTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/log/LogFlushScanTest.java?rev=1196595&r1=1196594&r2=1196595&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/log/LogFlushScanTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/log/LogFlushScanTest.java
Wed Nov  2 14:17:53 2011
@@ -17,11 +17,16 @@
  *  under the License.
  *
  */
-package org.apache.directory.server.core.log;
+package org.apache.directory.server.core.shared.log;
 
 import java.io.IOException;
 import java.util.Arrays;
 
+import org.apache.directory.server.core.api.log.InvalidLogException;
+import org.apache.directory.server.core.api.log.Log;
+import org.apache.directory.server.core.api.log.LogAnchor;
+import org.apache.directory.server.core.api.log.LogScanner;
+import org.apache.directory.server.core.api.log.UserLogRecord;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Rule;

Modified: directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/log/LogTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/log/LogTest.java?rev=1196595&r1=1196594&r2=1196595&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/log/LogTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/log/LogTest.java
Wed Nov  2 14:17:53 2011
@@ -17,7 +17,7 @@
  *  under the License.
  *
  */
-package org.apache.directory.server.core.log;
+package org.apache.directory.server.core.shared.log;
 
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.assertEquals;
@@ -26,6 +26,11 @@ import static org.junit.Assert.fail;
 import java.io.IOException;
 import java.util.Arrays;
 
+import org.apache.directory.server.core.api.log.InvalidLogException;
+import org.apache.directory.server.core.api.log.Log;
+import org.apache.directory.server.core.api.log.LogAnchor;
+import org.apache.directory.server.core.api.log.LogScanner;
+import org.apache.directory.server.core.api.log.UserLogRecord;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;

Modified: directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/DefaultTxnManagerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/DefaultTxnManagerTest.java?rev=1196595&r1=1196594&r2=1196595&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/DefaultTxnManagerTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/DefaultTxnManagerTest.java
Wed Nov  2 14:17:53 2011
@@ -17,13 +17,14 @@
  *  under the License.
  *
  */
-package org.apache.directory.server.core.txn;
+package org.apache.directory.server.core.shared.txn;
 
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.ObjectOutputStream;
 
-import org.apache.directory.server.core.log.InvalidLogException;
+import org.apache.directory.server.core.api.log.InvalidLogException;
+import org.apache.directory.server.core.api.txn.TxnConflictException;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Rule;

Modified: directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/EntryUpdateMergeTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/EntryUpdateMergeTest.java?rev=1196595&r1=1196594&r2=1196595&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/EntryUpdateMergeTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/EntryUpdateMergeTest.java
Wed Nov  2 14:17:53 2011
@@ -17,7 +17,7 @@
  *  under the License.
  *
  */
-package org.apache.directory.server.core.txn;
+package org.apache.directory.server.core.shared.txn;
 
 
 import java.io.IOException;
@@ -41,17 +41,17 @@ import org.junit.Rule;
 import org.junit.rules.TemporaryFolder;
 import org.junit.Test;
 
-import org.apache.directory.server.core.log.InvalidLogException;
-import org.apache.directory.server.core.txn.IndexCursorWrapperTest.MockIndex;
-import org.apache.directory.server.core.txn.logedit.EntryChange;
-import org.apache.directory.server.core.txn.logedit.EntryAddDelete;
-import org.apache.directory.server.core.txn.logedit.DataChangeContainer;
+import org.apache.directory.server.core.api.log.InvalidLogException;
+import org.apache.directory.server.core.shared.txn.logedit.EntryChange;
+import org.apache.directory.server.core.shared.txn.logedit.EntryAddDelete;
+import org.apache.directory.server.core.shared.txn.logedit.DataChangeContainer;
 
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
 import org.apache.directory.server.core.api.partition.index.MasterTable;
 import org.apache.directory.server.core.api.partition.index.AbstractTable;
+import org.apache.directory.server.core.api.txn.TxnLogManager;
 
 
 public class EntryUpdateMergeTest

Modified: directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/IndexCursorWrapperTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/IndexCursorWrapperTest.java?rev=1196595&r1=1196594&r2=1196595&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/IndexCursorWrapperTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/IndexCursorWrapperTest.java
Wed Nov  2 14:17:53 2011
@@ -17,7 +17,7 @@
  *  under the License.
  *
  */
-package org.apache.directory.server.core.txn;
+package org.apache.directory.server.core.shared.txn;
 
 
 import java.io.IOException;
@@ -29,8 +29,9 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.api.partition.index.GenericIndex;
 import org.apache.directory.server.core.api.partition.index.ReverseIndexComparator;
 import org.apache.directory.server.core.api.partition.index.IndexCursor;
+import org.apache.directory.server.core.api.txn.TxnLogManager;
 
-import org.apache.directory.server.core.log.InvalidLogException;
+import org.apache.directory.server.core.api.log.InvalidLogException;
 
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.entry.Entry;
@@ -41,8 +42,8 @@ import org.junit.Rule;
 import org.junit.rules.TemporaryFolder;
 import org.junit.Test;
 
-import org.apache.directory.server.core.txn.logedit.IndexChange;
-import org.apache.directory.server.core.txn.logedit.DataChangeContainer;
+import org.apache.directory.server.core.shared.txn.logedit.IndexChange;
+import org.apache.directory.server.core.shared.txn.logedit.DataChangeContainer;
 
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;

Modified: directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/LongComparator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/LongComparator.java?rev=1196595&r1=1196594&r2=1196595&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/LongComparator.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/LongComparator.java
Wed Nov  2 14:17:53 2011
@@ -17,7 +17,7 @@
  *  under the License.
  *
  */
-package org.apache.directory.server.core.txn;
+package org.apache.directory.server.core.shared.txn;
 
 
 import java.util.Comparator;

Modified: directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/LongSerializer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/LongSerializer.java?rev=1196595&r1=1196594&r2=1196595&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/LongSerializer.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/LongSerializer.java
Wed Nov  2 14:17:53 2011
@@ -17,7 +17,7 @@
  *  under the License.
  *
  */
-package org.apache.directory.server.core.txn;
+package org.apache.directory.server.core.shared.txn;
 
 
 import java.io.IOException;

Modified: directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/TxnConflicTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/TxnConflicTest.java?rev=1196595&r1=1196594&r2=1196595&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/TxnConflicTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/TxnConflicTest.java
Wed Nov  2 14:17:53 2011
@@ -17,12 +17,13 @@
  *  under the License.
  *
  */
-package org.apache.directory.server.core.txn;
+package org.apache.directory.server.core.shared.txn;
 
 
 import java.io.IOException;
 
-import org.apache.directory.server.core.log.InvalidLogException;
+import org.apache.directory.server.core.api.txn.TxnLogManager;
+import org.apache.directory.server.core.api.log.InvalidLogException;
 import org.apache.directory.shared.ldap.model.message.SearchScope;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.junit.Before;

Modified: directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/TxnIndexCursorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/TxnIndexCursorTest.java?rev=1196595&r1=1196594&r2=1196595&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/TxnIndexCursorTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-shared/src/test/java/org/apache/directory/server/core/shared/txn/TxnIndexCursorTest.java
Wed Nov  2 14:17:53 2011
@@ -17,7 +17,7 @@
  *  under the License.
  *
  */
-package org.apache.directory.server.core.txn;
+package org.apache.directory.server.core.shared.txn;
 
 
 import java.util.TreeSet;



Mime
View raw message