directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1214108 - in /directory/apacheds/branches/apacheds-txns/ldif-partition/src: main/java/org/apache/directory/server/core/partition/ldif/ test/java/org/apache/directory/server/core/partition/ldif/
Date Wed, 14 Dec 2011 08:38:22 GMT
Author: saya
Date: Wed Dec 14 08:38:22 2011
New Revision: 1214108

URL: http://svn.apache.org/viewvc?rev=1214108&view=rev
Log:
added txn and execution manager refs to various classes

Modified:
    directory/apacheds/branches/apacheds-txns/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/AbstractLdifPartition.java
    directory/apacheds/branches/apacheds-txns/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java
    directory/apacheds/branches/apacheds-txns/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java
    directory/apacheds/branches/apacheds-txns/ldif-partition/src/test/java/org/apache/directory/server/core/partition/ldif/LdifPartitionTest.java
    directory/apacheds/branches/apacheds-txns/ldif-partition/src/test/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartitionTest.java

Modified: directory/apacheds/branches/apacheds-txns/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/AbstractLdifPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/AbstractLdifPartition.java?rev=1214108&r1=1214107&r2=1214108&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/AbstractLdifPartition.java
(original)
+++ directory/apacheds/branches/apacheds-txns/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/AbstractLdifPartition.java
Wed Dec 14 08:38:22 2011
@@ -26,6 +26,7 @@ import java.net.URI;
 import org.apache.directory.server.core.api.partition.OperationExecutionManager;
 import org.apache.directory.server.core.partition.impl.avl.AvlPartition;
 import org.apache.directory.server.core.shared.partition.OperationExecutionManagerFactory;
+import org.apache.directory.server.core.shared.txn.TxnManagerFactory;
 import org.apache.directory.shared.ldap.model.csn.CsnFactory;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 
@@ -50,15 +51,16 @@ public abstract class AbstractLdifPartit
     protected OperationExecutionManager executionManager;
 
 
-    public AbstractLdifPartition( SchemaManager schemaManager )
+    public AbstractLdifPartition( SchemaManager schemaManager, TxnManagerFactory txnManagerFactory,
+        OperationExecutionManagerFactory executionManagerFactory )
     {
-        super( schemaManager );
+        super( schemaManager, txnManagerFactory, executionManagerFactory );
         
         // Create the CsnFactory with a invalid ReplicaId
         // @TODO : inject a correct ReplicaId
         defaultCSNFactory = new CsnFactory( 0 );
         
-        executionManager = OperationExecutionManagerFactory.instance();
+        executionManager = executionManagerFactory.instance();
     }
     
     

Modified: directory/apacheds/branches/apacheds-txns/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java?rev=1214108&r1=1214107&r2=1214108&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java
(original)
+++ directory/apacheds/branches/apacheds-txns/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java
Wed Dec 14 08:38:22 2011
@@ -39,6 +39,8 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.server.core.api.partition.index.IndexCursor;
 import org.apache.directory.server.core.api.partition.index.IndexEntry;
 import org.apache.directory.server.core.api.partition.index.UUIDComparator;
+import org.apache.directory.server.core.shared.partition.OperationExecutionManagerFactory;
+import org.apache.directory.server.core.shared.txn.TxnManagerFactory;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.model.entry.Entry;
@@ -122,9 +124,10 @@ public class LdifPartition extends Abstr
     /**
      * Creates a new instance of LdifPartition.
      */
-    public LdifPartition( SchemaManager schemaManager )
+    public LdifPartition( SchemaManager schemaManager, TxnManagerFactory txnManagerFactory,
+        OperationExecutionManagerFactory executionManagerFactory )
     {
-        super( schemaManager );
+        super( schemaManager, txnManagerFactory, executionManagerFactory );
     }
 
 

Modified: directory/apacheds/branches/apacheds-txns/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java?rev=1214108&r1=1214107&r2=1214108&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java
(original)
+++ directory/apacheds/branches/apacheds-txns/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartition.java
Wed Dec 14 08:38:22 2011
@@ -40,6 +40,8 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.core.api.partition.index.IndexCursor;
 import org.apache.directory.server.core.api.partition.index.IndexEntry;
+import org.apache.directory.server.core.shared.partition.OperationExecutionManagerFactory;
+import org.apache.directory.server.core.shared.txn.TxnManagerFactory;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.model.entry.Entry;
@@ -84,9 +86,10 @@ public class SingleFileLdifPartition ext
     /**
      * Creates a new instance of SingleFileLdifPartition.
      */
-    public SingleFileLdifPartition( SchemaManager schemaManager )
+    public SingleFileLdifPartition( SchemaManager schemaManager, TxnManagerFactory txnManagerFactory,
+        OperationExecutionManagerFactory executionManagerFactory )
     {
-        super( schemaManager );
+        super( schemaManager, txnManagerFactory, executionManagerFactory );
     }
 
 

Modified: directory/apacheds/branches/apacheds-txns/ldif-partition/src/test/java/org/apache/directory/server/core/partition/ldif/LdifPartitionTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/ldif-partition/src/test/java/org/apache/directory/server/core/partition/ldif/LdifPartitionTest.java?rev=1214108&r1=1214107&r2=1214108&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/ldif-partition/src/test/java/org/apache/directory/server/core/partition/ldif/LdifPartitionTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/ldif-partition/src/test/java/org/apache/directory/server/core/partition/ldif/LdifPartitionTest.java
Wed Dec 14 08:38:22 2011
@@ -94,6 +94,10 @@ public class LdifPartitionTest
     
     /** Operation execution manager */
     private static OperationExecutionManager executionManager;
+    
+    /** txn and operation execution manager factories */
+    private static TxnManagerFactory txnManagerFactory;
+    private static OperationExecutionManagerFactory executionManagerFactory;
 
     @Rule
     public TemporaryFolder folder = new TemporaryFolder();
@@ -113,9 +117,9 @@ public class LdifPartitionTest
         
         File logDir = new File( workingDirectory + File.separatorChar + "txnlog" + File.separatorChar
);
         logDir.mkdirs();
-        TxnManagerFactory.init( logDir.getPath(), 1 << 13, 1 << 14 );
-        OperationExecutionManagerFactory.init();
-        executionManager = OperationExecutionManagerFactory.instance();
+        txnManagerFactory = new TxnManagerFactory( logDir.getPath(), 1 << 13, 1 <<
14 );
+        executionManagerFactory = new OperationExecutionManagerFactory( txnManagerFactory
);
+        executionManager = executionManagerFactory.instance();
 
         File schemaRepository = new File( workingDirectory, "schema" );
         SchemaLdifExtractor extractor = new DefaultSchemaLdifExtractor( new File( workingDirectory
) );
@@ -143,7 +147,7 @@ public class LdifPartitionTest
 
         // initialize the store
         // initialize the partition
-        partition = new LdifPartition( schemaManager );
+        partition = new LdifPartition( schemaManager, txnManagerFactory, executionManagerFactory
);
         partition.setId( "test-ldif" );
         partition.setSuffixDn( new Dn( "ou=test,ou=system" ) );
         partition.setSchemaManager( schemaManager );

Modified: directory/apacheds/branches/apacheds-txns/ldif-partition/src/test/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartitionTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/ldif-partition/src/test/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartitionTest.java?rev=1214108&r1=1214107&r2=1214108&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/ldif-partition/src/test/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartitionTest.java
(original)
+++ directory/apacheds/branches/apacheds-txns/ldif-partition/src/test/java/org/apache/directory/server/core/partition/ldif/SingleFileLdifPartitionTest.java
Wed Dec 14 08:38:22 2011
@@ -114,6 +114,10 @@ public class SingleFileLdifPartitionTest
     
     /** Operation execution manager */
     private static OperationExecutionManager executionManager;
+    
+    /** txn and operation execution manager factories */
+    private static TxnManagerFactory txnManagerFactory;
+    private static OperationExecutionManagerFactory executionManagerFactory;
 
     @Rule
     public TemporaryFolder folder = new TemporaryFolder();
@@ -133,9 +137,9 @@ public class SingleFileLdifPartitionTest
         
         File logDir = new File( workingDirectory + File.separatorChar + "txnlog" + File.separatorChar
);
         logDir.mkdirs();
-        TxnManagerFactory.init( logDir.getPath(), 1 << 13, 1 << 14 );
-        OperationExecutionManagerFactory.init();
-        executionManager = OperationExecutionManagerFactory.instance();
+        txnManagerFactory = new TxnManagerFactory( logDir.getPath(), 1 << 13, 1 <<
14 );
+        executionManagerFactory = new OperationExecutionManagerFactory( txnManagerFactory
);
+        executionManager = executionManagerFactory.instance();
 
         File schemaRepository = new File( workingDirectory, "schema" );
         SchemaLdifExtractor extractor = new DefaultSchemaLdifExtractor( new File( workingDirectory
) );
@@ -224,7 +228,7 @@ public class SingleFileLdifPartitionTest
             rf.setLength( 0 );
         }
 
-        SingleFileLdifPartition partition = new SingleFileLdifPartition( schemaManager );
+        SingleFileLdifPartition partition = new SingleFileLdifPartition( schemaManager,txnManagerFactory,
executionManagerFactory );
         partition.setId( "test-ldif" );
         partition.setPartitionPath( new File( fileName ).toURI() );
         partition.setSuffixDn( new Dn( "ou=test,ou=system" ) );



Mime
View raw message