directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1088220 - in /directory/apacheds/trunk: protocol-ldap/src/main/java/org/apache/directory/server/ldap/ protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ protocol-ldap/src/main/java/org/apache/directory/server/ldap/repli...
Date Sun, 03 Apr 2011 07:51:50 GMT
Author: kayyagari
Date: Sun Apr  3 07:51:49 2011
New Revision: 1088220

URL: http://svn.apache.org/viewvc?rev=1088220&view=rev
Log:
o renamed ReplicationProvider to ReplicationReqHandler to avoid the confusion with provider/consumer
semantics while configuring the server

Added:
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicationRequestHandler.java
      - copied, changed from r1088209, directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicationProvider.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplRequestHandler.java
      - copied, changed from r1088209, directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplProvider.java
Removed:
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicationProvider.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplProvider.java
Modified:
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplSearchListener.java
    directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/ServiceBuilder.java

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java?rev=1088220&r1=1088219&r2=1088220&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
Sun Apr  3 07:51:49 2011
@@ -53,7 +53,7 @@ import org.apache.directory.server.ldap.
 import org.apache.directory.server.ldap.handlers.bind.MechanismHandler;
 import org.apache.directory.server.ldap.handlers.extended.StartTlsHandler;
 import org.apache.directory.server.ldap.handlers.ssl.LdapsInitializer;
-import org.apache.directory.server.ldap.replication.ReplicationProvider;
+import org.apache.directory.server.ldap.replication.ReplicationRequestHandler;
 import org.apache.directory.server.ldap.replication.SyncReplConsumer;
 import org.apache.directory.server.ldap.replication.SyncreplConfiguration;
 import org.apache.directory.server.protocol.shared.DirectoryBackedService;
@@ -211,7 +211,7 @@ public class LdapServer extends Director
 
     private List<IoFilterChainBuilder> chainBuilders = new ArrayList<IoFilterChainBuilder>();
 
-    private ReplicationProvider replicationProvider;
+    private ReplicationRequestHandler replicationReqHandler;
 
     private List<SyncreplConfiguration> providerConfigs;
 
@@ -487,10 +487,10 @@ public class LdapServer extends Director
 
         nexus.registerSupportedSaslMechanisms( saslMechanismHandlers.keySet() );
 
-        if ( replicationProvider != null )
+        if ( replicationReqHandler != null )
         {
-            replicationProvider.init( this );
-            ( ( SearchHandler ) getSearchHandler() ).setReplicationProvider( replicationProvider
);
+            replicationReqHandler.init( this );
+            ( ( SearchHandler ) getSearchHandler() ).setReplicationReqHandler( replicationReqHandler
);
         }
 
         startConsumers();
@@ -561,9 +561,9 @@ public class LdapServer extends Director
                     sessionIt.next().close( true );
                 }
 
-                if ( replicationProvider != null )
+                if ( replicationReqHandler != null )
                 {
-                    replicationProvider.stop();
+                    replicationReqHandler.stop();
                 }
             }
 
@@ -1325,9 +1325,9 @@ public class LdapServer extends Director
     }
 
 
-    public void setReplicationProvider( ReplicationProvider replicationProvider )
+    public void setReplicationReqHandler( ReplicationRequestHandler replicationProvider )
     {
-        this.replicationProvider = replicationProvider;
+        this.replicationReqHandler = replicationProvider;
     }
 
 

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java?rev=1088220&r1=1088219&r2=1088220&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
Sun Apr  3 07:51:49 2011
@@ -37,7 +37,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.ldap.LdapSession;
 import org.apache.directory.server.ldap.handlers.controls.PagedSearchContext;
-import org.apache.directory.server.ldap.replication.ReplicationProvider;
+import org.apache.directory.server.ldap.replication.ReplicationRequestHandler;
 import org.apache.directory.shared.ldap.codec.controls.search.pagedSearch.PagedResultsDecorator;
 import org.apache.directory.shared.ldap.extras.controls.SyncRequestValue;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
@@ -91,7 +91,7 @@ public class SearchHandler extends LdapR
     /** cached to save redundant lookups into registries */
     private AttributeType OBJECT_CLASS_AT;
 
-    protected ReplicationProvider replicationProvider;
+    protected ReplicationRequestHandler replicationReqHandler;
 
 
     /**
@@ -1612,9 +1612,9 @@ public class SearchHandler extends LdapR
     }
 
 
-    public void setReplicationProvider( ReplicationProvider prov )
+    public void setReplicationReqHandler( ReplicationRequestHandler prov )
     {
-        this.replicationProvider = prov;
+        this.replicationReqHandler = prov;
     }
 
 
@@ -1628,7 +1628,7 @@ public class SearchHandler extends LdapR
      */
     public void handleSyncreplSearch( LdapSession session, SearchRequest req ) throws LdapException
     {
-        replicationProvider.handleSyncRequest( session, req );
+        replicationReqHandler.handleSyncRequest( session, req );
     }
 
 }

Copied: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicationRequestHandler.java
(from r1088209, directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicationProvider.java)
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicationRequestHandler.java?p2=directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicationRequestHandler.java&p1=directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicationProvider.java&r1=1088209&r2=1088220&rev=1088220&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicationProvider.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/ReplicationRequestHandler.java
Sun Apr  3 07:51:49 2011
@@ -26,11 +26,11 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.SearchRequest;
 
 /**
- * Interface for a replication provider.
+ * Interface of a replication request handler in a provider/master.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public interface ReplicationProvider
+public interface ReplicationRequestHandler
 {
     /**
      * initializes the replication provider

Copied: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplRequestHandler.java
(from r1088209, directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplProvider.java)
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplRequestHandler.java?p2=directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplRequestHandler.java&p1=directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplProvider.java&r1=1088209&r2=1088220&rev=1088220&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplProvider.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplRequestHandler.java
Sun Apr  3 07:51:49 2011
@@ -99,12 +99,12 @@ import org.slf4j.LoggerFactory;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @SuppressWarnings("unchecked")
-public class SyncReplProvider implements ReplicationProvider
+public class SyncReplRequestHandler implements ReplicationRequestHandler
 {
 
     public static final String REPLICA_ID_DELIM = ";";
 
-    private static final Logger LOG = LoggerFactory.getLogger( SyncReplProvider.class );
+    private static final Logger LOG = LoggerFactory.getLogger( SyncReplRequestHandler.class
);
 
     private boolean initialized = false;
 
@@ -128,7 +128,7 @@ public class SyncReplProvider implements
     private ReplicaDitStoreUtil replicaUtil;
 
 
-    public SyncReplProvider()
+    public SyncReplRequestHandler()
     {
     }
 

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplSearchListener.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplSearchListener.java?rev=1088220&r1=1088219&r2=1088220&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplSearchListener.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/replication/SyncReplSearchListener.java
Sun Apr  3 07:51:49 2011
@@ -418,7 +418,7 @@ public class SyncReplSearchListener impl
     private byte[] getCookie( Entry entry ) throws LdapInvalidAttributeValueException
     {
         String csn = entry.get( SchemaConstants.ENTRY_CSN_AT ).getString();
-        return Strings.getBytesUtf8(clientMsgLog.getId() + SyncReplProvider.REPLICA_ID_DELIM
+ csn);
+        return Strings.getBytesUtf8(clientMsgLog.getId() + SyncReplRequestHandler.REPLICA_ID_DELIM
+ csn);
     }
 
 

Modified: directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/ServiceBuilder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/ServiceBuilder.java?rev=1088220&r1=1088219&r2=1088220&view=diff
==============================================================================
--- directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/ServiceBuilder.java
(original)
+++ directory/apacheds/trunk/service-builder/src/main/java/org/apache/directory/server/config/ServiceBuilder.java
Sun Apr  3 07:51:49 2011
@@ -85,8 +85,8 @@ import org.apache.directory.server.ldap.
 import org.apache.directory.server.ldap.LdapServer;
 import org.apache.directory.server.ldap.handlers.bind.MechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.ntlm.NtlmMechanismHandler;
-import org.apache.directory.server.ldap.replication.ReplicationProvider;
-import org.apache.directory.server.ldap.replication.SyncReplProvider;
+import org.apache.directory.server.ldap.replication.ReplicationRequestHandler;
+import org.apache.directory.server.ldap.replication.SyncReplRequestHandler;
 import org.apache.directory.server.ntp.NtpServer;
 import org.apache.directory.server.protocol.shared.transport.TcpTransport;
 import org.apache.directory.server.protocol.shared.transport.Transport;
@@ -923,18 +923,18 @@ public class ServiceBuilder
             if ( fqcn == null )
             {
                 // default replication provider
-                fqcn = SyncReplProvider.class.getName();
+                fqcn = SyncReplRequestHandler.class.getName();
             }
             
             try
             {
                 Class<?> replProvImplClz = Class.forName( fqcn );
-                ReplicationProvider rp = ( ReplicationProvider ) replProvImplClz.newInstance();
-                ldapServer.setReplicationProvider( rp );
+                ReplicationRequestHandler rp = ( ReplicationRequestHandler ) replProvImplClz.newInstance();
+                ldapServer.setReplicationReqHandler( rp );
             }
             catch( Exception e )
             {
-                String message = "Failed to load and instantiate ReplicationProvider implementation
: " + e.getMessage();
+                String message = "Failed to load and instantiate ReplicationRequestHandler
implementation : " + e.getMessage();
                 LOG.error( message );
                 throw new ConfigurationException( message );
             }



Mime
View raw message