directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1158666 - in /directory: apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/filtering/ apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/ apacheds/trunk/xdbm-partition/src...
Date Wed, 17 Aug 2011 12:44:40 GMT
Author: elecharny
Date: Wed Aug 17 12:44:39 2011
New Revision: 1158666

URL: http://svn.apache.org/viewvc?rev=1158666&view=rev
Log:
o Renamed the ServerEntryCursorAdaptor to EntryCursorAdaptor
o The AbstractIndexCursor now extends the AbstractCursor class
o The AbstractCursor.checkNotClosed method has been made public

Added:
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/EntryCursorAdaptor.java
      - copied, changed from r1158560, directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/ServerEntryCursorAdaptor.java
Removed:
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/ServerEntryCursorAdaptor.java
Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/filtering/CursorList.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractIndexCursor.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/AbstractCursor.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/filtering/CursorList.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/filtering/CursorList.java?rev=1158666&r1=1158665&r2=1158666&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/filtering/CursorList.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/filtering/CursorList.java
Wed Aug 17 12:44:39 2011
@@ -436,7 +436,8 @@ public class CursorList implements Entry
     public void close( Exception reason ) throws Exception
     {
         closed = true;
-        for ( Cursor c : list )
+        
+        for ( Cursor<?> c : list )
         {
             try
             {

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java?rev=1158666&r1=1158665&r2=1158666&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
Wed Aug 17 12:44:39 2011
@@ -821,7 +821,7 @@ public abstract class AbstractBTreeParti
     public EntryFilteringCursor list( ListOperationContext listContext ) throws LdapException
     {
         return new BaseEntryFilteringCursor( 
-            new ServerEntryCursorAdaptor<ID>( this, 
+            new EntryCursorAdaptor<ID>( this, 
                 list( getEntryId( listContext.getDn() ) ) ), listContext );
     }
 
@@ -866,7 +866,7 @@ public abstract class AbstractBTreeParti
 
             underlying = searchEngine.cursor( dn, derefMode, filter, searchCtls );
 
-            return new BaseEntryFilteringCursor( new ServerEntryCursorAdaptor<ID>(
this, underlying ), searchContext );
+            return new BaseEntryFilteringCursor( new EntryCursorAdaptor<ID>( this,
underlying ), searchContext );
         }
         catch ( LdapException le )
         {

Copied: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/EntryCursorAdaptor.java
(from r1158560, directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/ServerEntryCursorAdaptor.java)
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/EntryCursorAdaptor.java?p2=directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/EntryCursorAdaptor.java&p1=directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/ServerEntryCursorAdaptor.java&r1=1158560&r2=1158666&rev=1158666&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/ServerEntryCursorAdaptor.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/EntryCursorAdaptor.java
Wed Aug 17 12:44:39 2011
@@ -36,13 +36,13 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ServerEntryCursorAdaptor<ID extends Comparable<ID>> implements Cursor<Entry>
+public class EntryCursorAdaptor<ID extends Comparable<ID>> implements Cursor<Entry>
 {
     private final AbstractBTreePartition<ID> db;
     private final IndexCursor<ID, Entry, ID> indexCursor;
 
 
-    public ServerEntryCursorAdaptor( AbstractBTreePartition<ID> db, IndexCursor<ID,
Entry, ID> indexCursor )
+    public EntryCursorAdaptor( AbstractBTreePartition<ID> db, IndexCursor<ID, Entry,
ID> indexCursor )
     {
         this.db = db;
         this.indexCursor = indexCursor;

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractIndexCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractIndexCursor.java?rev=1158666&r1=1158665&r2=1158666&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractIndexCursor.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractIndexCursor.java
Wed Aug 17 12:44:39 2011
@@ -23,9 +23,8 @@ package org.apache.directory.server.xdbm
 import java.util.Iterator;
 
 import org.apache.directory.shared.i18n.I18n;
-import org.apache.directory.shared.ldap.model.cursor.ClosureMonitor;
+import org.apache.directory.shared.ldap.model.cursor.AbstractCursor;
 import org.apache.directory.shared.ldap.model.cursor.CursorIterator;
-import org.apache.directory.shared.ldap.model.cursor.DefaultClosureMonitor;
 
 
 /**
@@ -33,61 +32,8 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public abstract class AbstractIndexCursor<K, E, ID> implements IndexCursor<K, E,
ID>
+public abstract class AbstractIndexCursor<K, E, ID> extends AbstractCursor<IndexEntry<K,
E, ID>> implements IndexCursor<K, E, ID>
 {
-    private ClosureMonitor monitor = new DefaultClosureMonitor();
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public final void setClosureMonitor( ClosureMonitor monitor )
-    {
-        if ( monitor == null )
-        {
-            throw new IllegalArgumentException( "monitor" );
-        }
-
-        this.monitor = monitor;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    protected final void checkNotClosed( String operation ) throws Exception
-    {
-        monitor.checkNotClosed();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public final boolean isClosed()
-    {
-        return monitor.isClosed();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void close() throws Exception
-    {
-        monitor.close();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void close( Exception cause ) throws Exception
-    {
-        monitor.close( cause );
-    }
-
-
     /**
      * {@inheritDoc}
      */

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/AbstractCursor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/AbstractCursor.java?rev=1158666&r1=1158665&r2=1158666&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/AbstractCursor.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/AbstractCursor.java
Wed Aug 17 12:44:39 2011
@@ -56,7 +56,7 @@ public abstract class AbstractCursor<E> 
      * @param operation The operation we try to execute
      * @throws Exception If there is a problem during the check
      */
-    protected final void checkNotClosed( String operation ) throws Exception
+    public final void checkNotClosed( String operation ) throws Exception
     {
         monitor.checkNotClosed();
     }



Mime
View raw message