directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r951484 - in /directory/apacheds/trunk: core-api/src/main/java/org/apache/directory/server/core/interceptor/ core-api/src/test/java/org/apache/directory/server/core/ core/src/main/java/org/apache/directory/server/core/ core/src/main/java/or...
Date Fri, 04 Jun 2010 16:41:43 GMT
Author: elecharny
Date: Fri Jun  4 16:41:43 2010
New Revision: 951484

URL: http://svn.apache.org/viewvc?rev=951484&view=rev
Log:
Removed the addPartitionContext from the Interceptors, it's never called and can't be called
anyway.

Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java
    directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java?rev=951484&r1=951483&r2=951484&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/BaseInterceptor.java
Fri Jun  4 16:41:43 2010
@@ -28,7 +28,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.LdapPrincipal;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
-import org.apache.directory.server.core.interceptor.context.AddContextPartitionOperationContext;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
 import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
@@ -214,12 +213,6 @@ public abstract class BaseInterceptor im
     }
 
 
-    public void addContextPartition( NextInterceptor next, AddContextPartitionOperationContext
opContext ) throws LdapException
-    {
-        next.addContextPartition( opContext );
-    }
-
-
     public void removeContextPartition( NextInterceptor next, RemoveContextPartitionOperationContext
opContext ) throws LdapException
     {
         next.removeContextPartition( opContext );

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java?rev=951484&r1=951483&r2=951484&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/Interceptor.java
Fri Jun  4 16:41:43 2010
@@ -25,7 +25,6 @@ import java.util.Set;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
-import org.apache.directory.server.core.interceptor.context.AddContextPartitionOperationContext;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
 import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
@@ -161,12 +160,6 @@ public interface Interceptor
 
 
     /**
-     * Filters {@link DefaultPartitionNexus#addContextPartition( AddContextPartitionOperationContext
)} call.
-     */
-    void addContextPartition( NextInterceptor next, AddContextPartitionOperationContext opContext
) throws LdapException;
-
-
-    /**
      * Filters {@link DefaultPartitionNexus#removeContextPartition( RemoveContextPartitionOperationContext
)} call.
      */
     void removeContextPartition( NextInterceptor next, RemoveContextPartitionOperationContext
opContext ) throws LdapException;

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java?rev=951484&r1=951483&r2=951484&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/InterceptorChain.java
Fri Jun  4 16:41:43 2010
@@ -32,7 +32,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
-import org.apache.directory.server.core.interceptor.context.AddContextPartitionOperationContext;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
 import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
@@ -191,13 +190,6 @@ public class InterceptorChain
         }
 
 
-        public void addContextPartition( NextInterceptor next, AddContextPartitionOperationContext
opContext )
-            throws LdapException
-        {
-            nexus.addContextPartition( opContext );
-        }
-
-
         public void removeContextPartition( NextInterceptor next, RemoveContextPartitionOperationContext
opContext )
             throws LdapException
         {
@@ -651,28 +643,6 @@ public class InterceptorChain
     }
 
 
-    public void addContextPartition( AddContextPartitionOperationContext opContext ) throws
Exception
-    {
-        Element entry = getStartingEntry();
-        Interceptor head = entry.interceptor;
-        NextInterceptor next = entry.nextInterceptor;
-
-        try
-        {
-            head.addContextPartition( next, opContext );
-        }
-        catch ( Exception ne )
-        {
-            throw ne;
-        }
-        catch ( Throwable e )
-        {
-            throwInterceptorException( head, e );
-            throw new InternalError(); // Should be unreachable
-        }
-    }
-
-
     public void removeContextPartition( RemoveContextPartitionOperationContext opContext
) throws LdapException
     {
         Element entry = getStartingEntry();
@@ -1412,27 +1382,6 @@ public class InterceptorChain
                 }
 
 
-                public void addContextPartition( AddContextPartitionOperationContext opContext
) throws LdapException
-                {
-                    Element next = getNextEntry();
-                    Interceptor interceptor = next.interceptor;
-
-                    try
-                    {
-                        interceptor.addContextPartition( next.nextInterceptor, opContext
);
-                    }
-                    catch ( LdapException le )
-                    {
-                        throw le;
-                    }
-                    catch ( Throwable e )
-                    {
-                        throwInterceptorException( interceptor, e );
-                        throw new InternalError(); // Should be unreachable
-                    }
-                }
-
-
                 public void removeContextPartition( RemoveContextPartitionOperationContext
opContext ) throws LdapException
                 {
                     Element next = getNextEntry();

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java?rev=951484&r1=951483&r2=951484&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/NextInterceptor.java
Fri Jun  4 16:41:43 2010
@@ -24,7 +24,6 @@ import java.util.Set;
 
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
-import org.apache.directory.server.core.interceptor.context.AddContextPartitionOperationContext;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
 import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
@@ -89,12 +88,6 @@ public interface NextInterceptor
 
 
     /**
-     * Calls the next interceptor's {@link DefaultPartitionNexus#addContextPartition( AddContextPartitionOperationContext
)}.
-     */
-    void addContextPartition( AddContextPartitionOperationContext opContext ) throws LdapException;
-
-
-    /**
      * Calls the next interceptor's {@link DefaultPartitionNexus#removeContextPartition(
RemoveContextPartitionOperationContext )}.
      */
     void removeContextPartition( RemoveContextPartitionOperationContext opContext ) throws
LdapException;

Modified: directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockInterceptor.java?rev=951484&r1=951483&r2=951484&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockInterceptor.java
(original)
+++ directory/apacheds/trunk/core-api/src/test/java/org/apache/directory/server/core/MockInterceptor.java
Fri Jun  4 16:41:43 2010
@@ -27,7 +27,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
 import org.apache.directory.server.core.interceptor.Interceptor;
 import org.apache.directory.server.core.interceptor.NextInterceptor;
-import org.apache.directory.server.core.interceptor.context.AddContextPartitionOperationContext;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
 import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
@@ -115,14 +114,6 @@ public class MockInterceptor implements 
     }
 
 
-    public void addContextPartition( NextInterceptor next, AddContextPartitionOperationContext
opContext )
-        throws LdapException
-    {
-        interceptors.add( this );
-        next.addContextPartition( opContext );
-    }
-
-
     public void removeContextPartition( NextInterceptor next, RemoveContextPartitionOperationContext
opContext )
         throws LdapException
     {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=951484&r1=951483&r2=951484&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
Fri Jun  4 16:41:43 2010
@@ -1428,7 +1428,6 @@ public class DefaultDirectoryService imp
         partitionNexus = new DefaultPartitionNexus( new DefaultEntry( schemaManager, DN.EMPTY_DN
) );
         partitionNexus.setDirectoryService( this );
         partitionNexus.initialize( );
-        //partitionNexus.addContextPartition( new AddContextPartitionOperationContext( adminSession,
schemaService.getSchemaPartition() ) );
 
         // --------------------------------------------------------------------
         // Create all the bootstrap entries before initializing chain

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java?rev=951484&r1=951483&r2=951484&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/logger/TimerInterceptor.java
Fri Jun  4 16:41:43 2010
@@ -28,7 +28,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
 import org.apache.directory.server.core.interceptor.Interceptor;
 import org.apache.directory.server.core.interceptor.NextInterceptor;
-import org.apache.directory.server.core.interceptor.context.AddContextPartitionOperationContext;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
 import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
@@ -85,10 +84,6 @@ public class TimerInterceptor implements
     private static AtomicLong totalAdd = new AtomicLong( 0 );
     private static AtomicInteger nbAddCalls = new AtomicInteger( 0 );
 
-    /** Stats for the AddContextPartition operation */
-    private static AtomicLong totalAddContextPartition = new AtomicLong( 0 );
-    private static AtomicInteger nbAddContextPartitionCalls = new AtomicInteger( 0 );
-
     /** Stats for the bind operation */
     private static AtomicLong totalBind = new AtomicLong( 0 );
     private static AtomicInteger nbBindCalls = new AtomicInteger( 0 );
@@ -200,37 +195,6 @@ public class TimerInterceptor implements
     /**
      * {@inheritDoc}
      */
-    public void addContextPartition( NextInterceptor next, AddContextPartitionOperationContext
opContext )
-        throws LdapException
-    {
-        long t0 = System.nanoTime();
-        next.addContextPartition( opContext );
-        long delta = System.nanoTime() - t0;
-
-        if ( IS_DEBUG_STATS )
-        {
-            nbAddContextPartitionCalls.incrementAndGet();
-            totalAddContextPartition.getAndAdd( delta );
-    
-            if ( nbAddContextPartitionCalls.get() % 1000 == 0 )
-            {
-                long average = totalAddContextPartition.get()/(nbAddContextPartitionCalls.get()
* 1000);
-                OPERATION_STATS.debug( name + " : Average addContextPartition = {} microseconds,
nb addContextPartitions = {}", average, nbAddContextPartitionCalls.get() );
-            }
-        }
-
-        if ( IS_DEBUG_TIME )
-        {
-            OPERATION_TIME.debug( "{} : Delta add = {}", name, delta );
-        }
-        
-        System.out.println( "{} : Delta addContextPartition = " + delta );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
     public void bind( NextInterceptor next, BindOperationContext opContext ) throws LdapException
     {
         long t0 = System.nanoTime();

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java?rev=951484&r1=951483&r2=951484&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/NormalizationInterceptor.java
Fri Jun  4 16:41:43 2010
@@ -27,7 +27,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
 import org.apache.directory.server.core.interceptor.BaseInterceptor;
 import org.apache.directory.server.core.interceptor.NextInterceptor;
-import org.apache.directory.server.core.interceptor.context.AddContextPartitionOperationContext;
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
 import org.apache.directory.server.core.interceptor.context.CompareOperationContext;
@@ -351,17 +350,6 @@ public class NormalizationInterceptor ex
     /**
      * {@inheritDoc}
      */
-    public void addContextPartition( NextInterceptor next, AddContextPartitionOperationContext
opContext )
-        throws LdapException
-    {
-        opContext.getDn().normalize( schemaManager.getNormalizerMapping() );
-        next.addContextPartition( opContext );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
     public void removeContextPartition( NextInterceptor next, RemoveContextPartitionOperationContext
opContext )
         throws LdapException
     {



Mime
View raw message