You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2008/08/21 06:22:07 UTC
svn commit: r687552 - in /directory/apacheds/trunk:
btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/
btree-base/src/main/java/org/apache/directory/server/xdbm/
core-avl/src/main/java/org/apache/directory/server/core/avltr...
Author: akarasulu
Date: Wed Aug 20 21:22:04 2008
New Revision: 687552
URL: http://svn.apache.org/viewvc?rev=687552&view=rev
Log:
added setter for Cursor.setClosureMonitor() on various Cursor implementations
Modified:
directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexCursorAdaptor.java
directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/ValueArrayCursor.java
directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/xdbm/AbstractIndexCursor.java
directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/xdbm/AbstractTupleCursor.java
directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/xdbm/EmptyIndexCursor.java
directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/xdbm/SingletonIndexCursor.java
directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeCursor.java
directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsContainerCursor.java
directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsCursor.java
directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyBTreeCursor.java
directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyTupleAvlCursor.java
directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyTupleBTreeCursor.java
directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/NoDupsCursor.java
directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/AllEntriesCursor.java
directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/AndCursor.java
directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateCursor.java
directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityCursor.java
directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqCursor.java
directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqCursor.java
directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/NotCursor.java
directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeCursor.java
directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/OrCursor.java
directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceCursor.java
directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringCursor.java
directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeCursor.java
Modified: directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexCursorAdaptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexCursorAdaptor.java?rev=687552&r1=687551&r2=687552&view=diff
==============================================================================
--- directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexCursorAdaptor.java (original)
+++ directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexCursorAdaptor.java Wed Aug 20 21:22:04 2008
@@ -21,6 +21,7 @@
import org.apache.directory.server.xdbm.*;
+import org.apache.directory.server.core.cursor.ClosureMonitor;
import org.apache.directory.server.core.cursor.Cursor;
import org.apache.directory.server.core.cursor.CursorIterator;
@@ -169,6 +170,12 @@
{
return true;
}
+
+
+ public final void setClosureMonitor( ClosureMonitor monitor )
+ {
+ wrappedCursor.setClosureMonitor( monitor );
+ }
public void close() throws Exception
Modified: directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/ValueArrayCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/ValueArrayCursor.java?rev=687552&r1=687551&r2=687552&view=diff
==============================================================================
--- directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/ValueArrayCursor.java (original)
+++ directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/ValueArrayCursor.java Wed Aug 20 21:22:04 2008
@@ -81,21 +81,21 @@
public void beforeFirst() throws Exception
{
- checkClosed( "beforeFirst()" );
+ checkNotClosed( "beforeFirst()" );
pos = BEFORE_FIRST;
}
public void afterLast() throws Exception
{
- checkClosed( "afterLast()" );
+ checkNotClosed( "afterLast()" );
pos = values.size();
}
public boolean absolute( int absolutePosition ) throws Exception
{
- checkClosed( "absolute()" );
+ checkNotClosed( "absolute()" );
if ( absolutePosition >= values.size() )
{
pos = values.size();
@@ -115,7 +115,7 @@
public boolean first() throws Exception
{
- checkClosed( "first()" );
+ checkNotClosed( "first()" );
pos = 0;
return true;
}
@@ -123,7 +123,7 @@
public boolean last() throws Exception
{
- checkClosed( "last()" );
+ checkNotClosed( "last()" );
pos = values.size() - 1;
return true;
}
@@ -131,35 +131,35 @@
public boolean isFirst() throws Exception
{
- checkClosed( "isFirst()" );
+ checkNotClosed( "isFirst()" );
return pos == 0;
}
public boolean isLast() throws Exception
{
- checkClosed( "isLast()" );
+ checkNotClosed( "isLast()" );
return pos == values.size() - 1;
}
public boolean isAfterLast() throws Exception
{
- checkClosed( "isAfterLast()" );
+ checkNotClosed( "isAfterLast()" );
return pos == values.size();
}
public boolean isBeforeFirst() throws Exception
{
- checkClosed( "isBeforeFirst()" );
+ checkNotClosed( "isBeforeFirst()" );
return pos == BEFORE_FIRST;
}
public boolean previous() throws Exception
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
if ( pos <= BEFORE_FIRST )
{
return false;
@@ -178,7 +178,7 @@
public boolean next() throws Exception
{
- checkClosed( "next()" );
+ checkNotClosed( "next()" );
if ( pos >= values.size() )
{
return false;
@@ -191,7 +191,7 @@
public Tuple get() throws Exception
{
- checkClosed( "get()" );
+ checkNotClosed( "get()" );
if ( inRangeOnValue() )
{
return tuple.setBoth( key, values.get( pos ) );
Modified: directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/xdbm/AbstractIndexCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/xdbm/AbstractIndexCursor.java?rev=687552&r1=687551&r2=687552&view=diff
==============================================================================
--- directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/xdbm/AbstractIndexCursor.java (original)
+++ directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/xdbm/AbstractIndexCursor.java Wed Aug 20 21:22:04 2008
@@ -20,8 +20,9 @@
package org.apache.directory.server.xdbm;
-import org.apache.directory.server.core.cursor.CursorClosedException;
+import org.apache.directory.server.core.cursor.ClosureMonitor;
import org.apache.directory.server.core.cursor.CursorIterator;
+import org.apache.directory.server.core.cursor.DefaultClosureMonitor;
import java.util.Iterator;
@@ -34,40 +35,41 @@
*/
public abstract class AbstractIndexCursor<K, E> implements IndexCursor<K, E>
{
- private boolean closed;
- private Exception reason;
-
+ private ClosureMonitor monitor = new DefaultClosureMonitor();
- protected void checkClosed( String operation ) throws Exception
+
+ public final void setClosureMonitor( ClosureMonitor monitor )
{
- if ( isClosed() )
+ if ( monitor == null )
{
- if ( reason != null )
- {
- throw reason;
- }
-
- throw new CursorClosedException( "Attempting " + operation + " operation on a closed Cursor." );
+ throw new NullPointerException( "monitor" );
}
+
+ this.monitor = monitor;
+ }
+
+
+ protected final void checkNotClosed( String operation ) throws Exception
+ {
+ monitor.checkNotClosed();
}
- public boolean isClosed()
+ public final boolean isClosed()
{
- return closed;
+ return monitor.isClosed();
}
public void close() throws Exception
{
- closed = true;
+ monitor.close();
}
- public void close( Exception reason ) throws Exception
+ public void close( Exception cause ) throws Exception
{
- this.reason = reason;
- closed = true;
+ monitor.close( cause );
}
Modified: directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/xdbm/AbstractTupleCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/xdbm/AbstractTupleCursor.java?rev=687552&r1=687551&r2=687552&view=diff
==============================================================================
--- directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/xdbm/AbstractTupleCursor.java (original)
+++ directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/xdbm/AbstractTupleCursor.java Wed Aug 20 21:22:04 2008
@@ -20,8 +20,9 @@
package org.apache.directory.server.xdbm;
-import org.apache.directory.server.core.cursor.CursorClosedException;
+import org.apache.directory.server.core.cursor.ClosureMonitor;
import org.apache.directory.server.core.cursor.CursorIterator;
+import org.apache.directory.server.core.cursor.DefaultClosureMonitor;
import java.util.Iterator;
@@ -34,39 +35,40 @@
*/
public abstract class AbstractTupleCursor<K,V> implements TupleCursor<K,V>
{
- private boolean closed;
- private Exception reason;
+ private ClosureMonitor monitor = new DefaultClosureMonitor();
-
- protected void checkClosed( String operation ) throws Exception
+
+ public final void setClosureMonitor( ClosureMonitor monitor )
{
- if ( isClosed() )
+ if ( monitor == null )
{
- if ( reason != null )
- {
- throw reason;
- }
- throw new CursorClosedException( "Attempting " + operation + " operation on a closed Cursor." );
+ throw new NullPointerException( "monitor" );
}
+ this.monitor = monitor;
+ }
+
+
+ protected final void checkNotClosed( String operation ) throws Exception
+ {
+ monitor.checkNotClosed();
}
- public boolean isClosed()
+ public final boolean isClosed()
{
- return closed;
+ return monitor.isClosed();
}
public void close() throws Exception
{
- closed = true;
+ monitor.close();
}
- public void close( Exception reason ) throws Exception
+ public void close( Exception cause ) throws Exception
{
- this.reason = reason;
- closed = true;
+ monitor.close( cause );
}
Modified: directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/xdbm/EmptyIndexCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/xdbm/EmptyIndexCursor.java?rev=687552&r1=687551&r2=687552&view=diff
==============================================================================
--- directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/xdbm/EmptyIndexCursor.java (original)
+++ directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/xdbm/EmptyIndexCursor.java Wed Aug 20 21:22:04 2008
@@ -37,59 +37,59 @@
public void before( IndexEntry<K,E> element ) throws Exception
{
- checkClosed( "before()" );
+ checkNotClosed( "before()" );
}
public void after( IndexEntry<K,E> element ) throws Exception
{
- checkClosed( "after()" );
+ checkNotClosed( "after()" );
}
public void beforeFirst() throws Exception
{
- checkClosed( "beforeFirst()" );
+ checkNotClosed( "beforeFirst()" );
}
public void afterLast() throws Exception
{
- checkClosed( "afterLast()" );
+ checkNotClosed( "afterLast()" );
}
public boolean first() throws Exception
{
- checkClosed( "first()" );
+ checkNotClosed( "first()" );
return false;
}
public boolean last() throws Exception
{
- checkClosed( "last()" );
+ checkNotClosed( "last()" );
return false;
}
public boolean previous() throws Exception
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
return false;
}
public boolean next() throws Exception
{
- checkClosed( "next()" );
+ checkNotClosed( "next()" );
return false;
}
public IndexEntry<K,E> get() throws Exception
{
- checkClosed( "get()" );
+ checkNotClosed( "get()" );
throw new InvalidCursorPositionException( "This cursor is empty and cannot return elements!" );
}
@@ -101,11 +101,11 @@
public void afterValue( Long id, K indexValue ) throws Exception
{
- checkClosed( "after()" );
+ checkNotClosed( "after()" );
}
public void beforeValue( Long id, K indexValue ) throws Exception
{
- checkClosed( "after()" );
+ checkNotClosed( "after()" );
}
}
Modified: directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/xdbm/SingletonIndexCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/xdbm/SingletonIndexCursor.java?rev=687552&r1=687551&r2=687552&view=diff
==============================================================================
--- directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/xdbm/SingletonIndexCursor.java (original)
+++ directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/xdbm/SingletonIndexCursor.java Wed Aug 20 21:22:04 2008
@@ -74,7 +74,7 @@
public void beforeFirst() throws Exception
{
- checkClosed( "()" );
+ checkNotClosed( "()" );
beforeFirst = true;
afterLast = false;
onSingleton = false;
@@ -83,7 +83,7 @@
public void afterLast() throws Exception
{
- checkClosed( "()" );
+ checkNotClosed( "()" );
beforeFirst = false;
afterLast = true;
onSingleton = false;
@@ -92,7 +92,7 @@
public boolean first() throws Exception
{
- checkClosed( "()" );
+ checkNotClosed( "()" );
beforeFirst = false;
onSingleton = true;
afterLast = false;
@@ -102,7 +102,7 @@
public boolean last() throws Exception
{
- checkClosed( "()" );
+ checkNotClosed( "()" );
beforeFirst = false;
onSingleton = true;
afterLast = false;
@@ -112,35 +112,35 @@
public boolean isFirst() throws Exception
{
- checkClosed( "()" );
+ checkNotClosed( "()" );
return onSingleton;
}
public boolean isLast() throws Exception
{
- checkClosed( "()" );
+ checkNotClosed( "()" );
return onSingleton;
}
public boolean isAfterLast() throws Exception
{
- checkClosed( "()" );
+ checkNotClosed( "()" );
return afterLast;
}
public boolean isBeforeFirst() throws Exception
{
- checkClosed( "()" );
+ checkNotClosed( "()" );
return beforeFirst;
}
public boolean previous() throws Exception
{
- checkClosed( "()" );
+ checkNotClosed( "()" );
if ( beforeFirst )
{
return false;
@@ -164,7 +164,7 @@
public boolean next() throws Exception
{
- checkClosed( "()" );
+ checkNotClosed( "()" );
if ( beforeFirst )
{
beforeFirst = false;
@@ -188,7 +188,7 @@
public IndexEntry<K,E> get() throws Exception
{
- checkClosed( "()" );
+ checkNotClosed( "()" );
if ( onSingleton )
{
return singleton;
Modified: directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeCursor.java?rev=687552&r1=687551&r2=687552&view=diff
==============================================================================
--- directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeCursor.java (original)
+++ directory/apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/AvlTreeCursor.java Wed Aug 20 21:22:04 2008
@@ -47,7 +47,7 @@
public void after( K element ) throws Exception
{
- checkClosed( "after" );
+ checkNotClosed( "after" );
if ( element == null )
{
@@ -75,7 +75,7 @@
public void afterLast() throws Exception
{
- checkClosed( "afterLast" );
+ checkNotClosed( "afterLast" );
node = tree.getLast();
isBeforeFirst = false;
isAfterLast = true;
@@ -91,7 +91,7 @@
public void before( K element ) throws Exception
{
- checkClosed( "before" );
+ checkNotClosed( "before" );
if ( element == null )
{
@@ -118,7 +118,7 @@
public void beforeFirst() throws Exception
{
- checkClosed( "beforeFirst" );
+ checkNotClosed( "beforeFirst" );
node = tree.getFirst();
isBeforeFirst = true;
isAfterLast = false;
@@ -128,7 +128,7 @@
public boolean first() throws Exception
{
- checkClosed( "first" );
+ checkNotClosed( "first" );
node = tree.getFirst();
isBeforeFirst = false;
isAfterLast = false;
@@ -138,7 +138,7 @@
public K get() throws Exception
{
- checkClosed( "get" );
+ checkNotClosed( "get" );
if ( onNode )
{
return node.getKey();
@@ -156,7 +156,7 @@
public boolean last() throws Exception
{
- checkClosed( "last" );
+ checkNotClosed( "last" );
node = tree.getLast();
isBeforeFirst = false;
isAfterLast = false;
@@ -166,7 +166,7 @@
public boolean next() throws Exception
{
- checkClosed( "next" );
+ checkNotClosed( "next" );
if ( isBeforeFirst )
{
@@ -206,7 +206,7 @@
public boolean previous() throws Exception
{
- checkClosed( "previous" );
+ checkNotClosed( "previous" );
if ( isBeforeFirst )
{
Modified: directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsContainerCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsContainerCursor.java?rev=687552&r1=687551&r2=687552&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsContainerCursor.java (original)
+++ directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsContainerCursor.java Wed Aug 20 21:22:04 2008
@@ -82,7 +82,7 @@
public void beforeKey( K key ) throws Exception
{
- checkClosed( "beforeKey()" );
+ checkNotClosed( "beforeKey()" );
browser = table.getBTree().browse( key );
forwardDirection = null;
clearValue();
@@ -104,7 +104,7 @@
*/
while ( browser.getNext( jdbmTuple ) )
{
- checkClosed( "afterKey()" );
+ checkNotClosed( "afterKey()" );
K next = ( K ) jdbmTuple.getKey();
int nextCompared = table.getKeyComparator().compare( next, key );
@@ -159,7 +159,7 @@
public void beforeFirst() throws Exception
{
- checkClosed( "afterKey()" );
+ checkNotClosed( "afterKey()" );
browser = table.getBTree().browse();
forwardDirection = null;
clearValue();
@@ -168,7 +168,7 @@
public void afterLast() throws Exception
{
- checkClosed( "afterKey()" );
+ checkNotClosed( "afterKey()" );
browser = table.getBTree().browse( null );
forwardDirection = null;
clearValue();
@@ -192,7 +192,7 @@
@SuppressWarnings("unchecked")
public boolean previous() throws Exception
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
if ( browser == null )
{
afterLast();
@@ -230,7 +230,7 @@
@SuppressWarnings("unchecked")
public boolean next() throws Exception
{
- checkClosed( "next()" );
+ checkNotClosed( "next()" );
if ( browser == null )
{
beforeFirst();
@@ -267,7 +267,7 @@
public Tuple<K,DupsContainer<V>> get() throws Exception
{
- checkClosed( "get()" );
+ checkNotClosed( "get()" );
if ( valueAvailable )
{
return returnedTuple;
Modified: directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsCursor.java?rev=687552&r1=687551&r2=687552&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsCursor.java (original)
+++ directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsCursor.java Wed Aug 20 21:22:04 2008
@@ -85,7 +85,7 @@
public void beforeValue( K key, V value ) throws Exception
{
- checkClosed( "beforeValue()" );
+ checkNotClosed( "beforeValue()" );
containerCursor.before( new Tuple<K,DupsContainer<V>>( key, null ) );
if ( containerCursor.next() )
@@ -132,7 +132,7 @@
public void afterValue( K key, V value ) throws Exception
{
- checkClosed( "afterValue()" );
+ checkNotClosed( "afterValue()" );
/*
* There is a subtle difference between after and before handling
* with dupicate key values. Say we have the following tuples:
@@ -213,7 +213,7 @@
public void beforeFirst() throws Exception
{
- checkClosed( "beforeFirst()" );
+ checkNotClosed( "beforeFirst()" );
clearValue();
containerCursor.beforeFirst();
containerTuple.setKey( null );
@@ -224,7 +224,7 @@
public void afterLast() throws Exception
{
- checkClosed( "afterLast()" );
+ checkNotClosed( "afterLast()" );
clearValue();
containerCursor.afterLast();
containerTuple.setKey( null );
@@ -235,7 +235,7 @@
public boolean first() throws Exception
{
- checkClosed( "first()" );
+ checkNotClosed( "first()" );
clearValue();
dupsCursor = null;
@@ -272,7 +272,7 @@
public boolean last() throws Exception
{
- checkClosed( "last()" );
+ checkNotClosed( "last()" );
clearValue();
dupsCursor = null;
@@ -319,7 +319,7 @@
public boolean previous() throws Exception
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
/*
* If the iterator over the values of the current key is null or is
* extinguished then we need to advance to the previous key.
@@ -371,7 +371,7 @@
public boolean next() throws Exception
{
- checkClosed( "next()" );
+ checkNotClosed( "next()" );
/*
* If the iterator over the values of the current key is null or is
* extinguished then we need to advance to the next key.
@@ -429,7 +429,7 @@
public Tuple<K,V> get() throws Exception
{
- checkClosed( "get()" );
+ checkNotClosed( "get()" );
if ( ! valueAvailable )
{
Modified: directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyBTreeCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyBTreeCursor.java?rev=687552&r1=687551&r2=687552&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyBTreeCursor.java (original)
+++ directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyBTreeCursor.java Wed Aug 20 21:22:04 2008
@@ -76,7 +76,7 @@
public void before( E element ) throws Exception
{
- checkClosed( "before()" );
+ checkNotClosed( "before()" );
browser = btree.browse( element );
clearValue();
}
@@ -95,7 +95,7 @@
*/
while ( browser.getNext( tuple ) )
{
- checkClosed( "after()" );
+ checkNotClosed( "after()" );
//noinspection unchecked
E next = ( E ) tuple.getKey();
int nextCompared = comparator.compare( next, element );
@@ -125,7 +125,7 @@
public void beforeFirst() throws Exception
{
- checkClosed( "beforeFirst()" );
+ checkNotClosed( "beforeFirst()" );
browser = btree.browse();
clearValue();
}
@@ -133,7 +133,7 @@
public void afterLast() throws Exception
{
- checkClosed( "afterLast()" );
+ checkNotClosed( "afterLast()" );
browser = btree.browse( null );
}
@@ -154,7 +154,7 @@
public boolean previous() throws Exception
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
if ( browser == null )
{
browser = btree.browse( null );
@@ -174,7 +174,7 @@
public boolean next() throws Exception
{
- checkClosed( "next()" );
+ checkNotClosed( "next()" );
if ( browser == null )
{
browser = btree.browse();
@@ -194,7 +194,7 @@
public E get() throws Exception
{
- checkClosed( "get()" );
+ checkNotClosed( "get()" );
if ( valueAvailable )
{
//noinspection unchecked
Modified: directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyTupleAvlCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyTupleAvlCursor.java?rev=687552&r1=687551&r2=687552&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyTupleAvlCursor.java (original)
+++ directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyTupleAvlCursor.java Wed Aug 20 21:22:04 2008
@@ -84,7 +84,7 @@
public void beforeValue( K key, V value ) throws Exception
{
- checkClosed( "beforeValue()" );
+ checkNotClosed( "beforeValue()" );
if ( key != null && ! key.equals( this.key ) )
{
throw new UnsupportedOperationException( "This cursor locks down the key so keywise advances are not allowed." );
@@ -97,7 +97,7 @@
public void afterValue( K key, V value ) throws Exception
{
- checkClosed( "afterValue()" );
+ checkNotClosed( "afterValue()" );
if ( key != null && ! key.equals( this.key ) )
{
throw new UnsupportedOperationException( "This cursor locks down the key so keywise advances are not allowed." );
@@ -118,7 +118,7 @@
*/
public void before( Tuple<K,V> element ) throws Exception
{
- checkClosed( "before()" );
+ checkNotClosed( "before()" );
wrapped.before( element.getValue() );
clearValue();
}
@@ -126,7 +126,7 @@
public void after( Tuple<K,V> element ) throws Exception
{
- checkClosed( "after()" );
+ checkNotClosed( "after()" );
wrapped.after( element.getValue() );
clearValue();
}
@@ -134,7 +134,7 @@
public void beforeFirst() throws Exception
{
- checkClosed( "beforeFirst()" );
+ checkNotClosed( "beforeFirst()" );
wrapped.beforeFirst();
clearValue();
}
@@ -142,7 +142,7 @@
public void afterLast() throws Exception
{
- checkClosed( "afterLast()" );
+ checkNotClosed( "afterLast()" );
wrapped.afterLast();
clearValue();
}
@@ -164,7 +164,7 @@
public boolean previous() throws Exception
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
if ( wrapped.previous() )
{
returnedTuple.setKey( key );
@@ -181,7 +181,7 @@
public boolean next() throws Exception
{
- checkClosed( "next()" );
+ checkNotClosed( "next()" );
if ( wrapped.next() )
{
returnedTuple.setKey( key );
@@ -198,7 +198,7 @@
public Tuple<K,V> get() throws Exception
{
- checkClosed( "get()" );
+ checkNotClosed( "get()" );
if ( valueAvailable )
{
return returnedTuple;
Modified: directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyTupleBTreeCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyTupleBTreeCursor.java?rev=687552&r1=687551&r2=687552&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyTupleBTreeCursor.java (original)
+++ directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyTupleBTreeCursor.java Wed Aug 20 21:22:04 2008
@@ -94,7 +94,7 @@
public void beforeValue( K key, V value ) throws Exception
{
- checkClosed( "beforeValue()" );
+ checkNotClosed( "beforeValue()" );
if ( key != null && ! key.equals( this.key ) )
{
throw new UnsupportedOperationException( "This cursor locks down the key so keywise advances are not allowed." );
@@ -123,7 +123,7 @@
*/
while ( browser.getNext( valueTuple ) )
{
- checkClosed( "afterValue" );
+ checkNotClosed( "afterValue" );
//noinspection unchecked
V next = ( V ) valueTuple.getKey();
@@ -170,7 +170,7 @@
*/
public void before( Tuple<K,V> element ) throws Exception
{
- checkClosed( "before()" );
+ checkNotClosed( "before()" );
browser = btree.browse( element.getValue() );
clearValue();
}
@@ -184,7 +184,7 @@
public void beforeFirst() throws Exception
{
- checkClosed( "beforeFirst()" );
+ checkNotClosed( "beforeFirst()" );
browser = btree.browse();
clearValue();
}
@@ -192,7 +192,7 @@
public void afterLast() throws Exception
{
- checkClosed( "afterLast()" );
+ checkNotClosed( "afterLast()" );
browser = btree.browse( null );
}
@@ -213,7 +213,7 @@
public boolean previous() throws Exception
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
if ( browser.getPrevious( valueTuple ) )
{
// work around to fix direction change problem with jdbm browser
@@ -238,7 +238,7 @@
public boolean next() throws Exception
{
- checkClosed( "next()" );
+ checkNotClosed( "next()" );
if ( browser.getNext( valueTuple ) )
{
// work around to fix direction change problem with jdbm browser
@@ -263,7 +263,7 @@
public Tuple<K,V> get() throws Exception
{
- checkClosed( "get()" );
+ checkNotClosed( "get()" );
if ( valueAvailable )
{
//noinspection unchecked
Modified: directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/NoDupsCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/NoDupsCursor.java?rev=687552&r1=687551&r2=687552&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/NoDupsCursor.java (original)
+++ directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/NoDupsCursor.java Wed Aug 20 21:22:04 2008
@@ -77,7 +77,7 @@
public void beforeKey( K key ) throws Exception
{
- checkClosed( "beforeKey()" );
+ checkNotClosed( "beforeKey()" );
browser = table.getBTree().browse( key );
clearValue();
}
@@ -97,7 +97,7 @@
*/
while ( browser.getNext( jdbmTuple ) )
{
- checkClosed( "afterKey()" );
+ checkNotClosed( "afterKey()" );
K next = ( K ) jdbmTuple.getKey();
int nextCompared = table.getKeyComparator().compare( next, key );
@@ -146,7 +146,7 @@
public void beforeFirst() throws Exception
{
- checkClosed( "beforeFirst()" );
+ checkNotClosed( "beforeFirst()" );
browser = table.getBTree().browse();
clearValue();
}
@@ -154,7 +154,7 @@
public void afterLast() throws Exception
{
- checkClosed( "afterLast()" );
+ checkNotClosed( "afterLast()" );
browser = table.getBTree().browse( null );
clearValue();
}
@@ -177,7 +177,7 @@
@SuppressWarnings("unchecked")
public boolean previous() throws Exception
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
if ( browser == null )
{
afterLast();
@@ -209,7 +209,7 @@
@SuppressWarnings("unchecked")
public boolean next() throws Exception
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
if ( browser == null )
{
beforeFirst();
@@ -240,7 +240,7 @@
public Tuple<K,V> get() throws Exception
{
- checkClosed( "get()" );
+ checkNotClosed( "get()" );
if ( valueAvailable )
{
return returnedTuple;
Modified: directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/AllEntriesCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/AllEntriesCursor.java?rev=687552&r1=687551&r2=687552&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/AllEntriesCursor.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/AllEntriesCursor.java Wed Aug 20 21:22:04 2008
@@ -52,7 +52,7 @@
*/
public void afterValue( Long key, Long value ) throws Exception
{
- checkClosed( "afterValue()" );
+ checkNotClosed( "afterValue()" );
wrapped.afterValue( key, null );
}
@@ -62,7 +62,7 @@
*/
public void beforeValue( Long id, Long value ) throws Exception
{
- checkClosed( "beforeValue()" );
+ checkNotClosed( "beforeValue()" );
wrapped.beforeValue( id, null );
}
@@ -72,7 +72,7 @@
*/
public void after( IndexEntry<Long,ServerEntry> indexEntry ) throws Exception
{
- checkClosed( "after()" );
+ checkNotClosed( "after()" );
wrapped.afterValue( indexEntry.getId(), null );
}
@@ -82,7 +82,7 @@
*/
public void afterLast() throws Exception
{
- checkClosed( "afterLast()" );
+ checkNotClosed( "afterLast()" );
wrapped.afterLast();
}
@@ -101,7 +101,7 @@
*/
public void before( IndexEntry<Long,ServerEntry> indexEntry ) throws Exception
{
- checkClosed( "before()" );
+ checkNotClosed( "before()" );
wrapped.beforeValue( indexEntry.getId(), null );
}
@@ -111,7 +111,7 @@
*/
public void beforeFirst() throws Exception
{
- checkClosed( "beforeFirst()" );
+ checkNotClosed( "beforeFirst()" );
wrapped.beforeFirst();
}
@@ -121,7 +121,7 @@
*/
public boolean first() throws Exception
{
- checkClosed( "first()" );
+ checkNotClosed( "first()" );
return wrapped.first();
}
@@ -131,7 +131,7 @@
*/
public IndexEntry<Long,ServerEntry> get() throws Exception
{
- checkClosed( "get()" );
+ checkNotClosed( "get()" );
IndexEntry<String,ServerEntry> wrappedEntry = wrapped.get();
indexEntry.setId( wrappedEntry.getId() );
indexEntry.setValue( wrappedEntry.getId() );
@@ -154,7 +154,7 @@
*/
public boolean last() throws Exception
{
- checkClosed( "last()" );
+ checkNotClosed( "last()" );
return wrapped.last();
}
@@ -164,7 +164,7 @@
*/
public boolean next() throws Exception
{
- checkClosed( "next()" );
+ checkNotClosed( "next()" );
return wrapped.next();
}
@@ -174,7 +174,7 @@
*/
public boolean previous() throws Exception
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
return wrapped.previous();
}
}
Modified: directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/AndCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/AndCursor.java?rev=687552&r1=687551&r2=687552&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/AndCursor.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/AndCursor.java Wed Aug 20 21:22:04 2008
@@ -86,7 +86,7 @@
public void beforeFirst() throws Exception
{
- checkClosed( "beforeFirst()" );
+ checkNotClosed( "beforeFirst()" );
wrapped.beforeFirst();
available = false;
}
@@ -94,7 +94,7 @@
public void afterLast() throws Exception
{
- checkClosed( "afterLast()" );
+ checkNotClosed( "afterLast()" );
wrapped.afterLast();
available = false;
}
@@ -118,7 +118,7 @@
{
while ( wrapped.previous() )
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
IndexEntry<?,ServerEntry> candidate = wrapped.get();
if ( matches( candidate ) )
@@ -135,7 +135,7 @@
{
while ( wrapped.next() )
{
- checkClosed( "next()" );
+ checkNotClosed( "next()" );
IndexEntry<?,ServerEntry> candidate = wrapped.get();
if ( matches( candidate ) )
{
@@ -149,7 +149,7 @@
public IndexEntry<V, ServerEntry> get() throws Exception
{
- checkClosed( "get()" );
+ checkNotClosed( "get()" );
if ( available )
{
return wrapped.get();
Modified: directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateCursor.java?rev=687552&r1=687551&r2=687552&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateCursor.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateCursor.java Wed Aug 20 21:22:04 2008
@@ -94,7 +94,7 @@
public void beforeValue( Long id, V value ) throws Exception
{
- checkClosed( "beforeValue()" );
+ checkNotClosed( "beforeValue()" );
if ( userIdxCursor != null )
{
userIdxCursor.beforeValue( id, value );
@@ -108,7 +108,7 @@
public void afterValue( Long id, V value ) throws Exception
{
- checkClosed( "afterValue()" );
+ checkNotClosed( "afterValue()" );
if ( userIdxCursor != null )
{
userIdxCursor.afterValue( id, value );
@@ -122,7 +122,7 @@
public void before( IndexEntry<V, ServerEntry> element ) throws Exception
{
- checkClosed( "before()" );
+ checkNotClosed( "before()" );
if ( userIdxCursor != null )
{
userIdxCursor.before( element );
@@ -136,7 +136,7 @@
public void after( IndexEntry<V, ServerEntry> element ) throws Exception
{
- checkClosed( "after()" );
+ checkNotClosed( "after()" );
if ( userIdxCursor != null )
{
userIdxCursor.after( element );
@@ -150,7 +150,7 @@
public void beforeFirst() throws Exception
{
- checkClosed( "beforeFirst()" );
+ checkNotClosed( "beforeFirst()" );
if ( userIdxCursor != null )
{
userIdxCursor.beforeFirst();
@@ -165,7 +165,7 @@
public void afterLast() throws Exception
{
- checkClosed( "afterLast()" );
+ checkNotClosed( "afterLast()" );
if ( userIdxCursor != null )
{
userIdxCursor.afterLast();
@@ -201,7 +201,7 @@
while( ndnIdxCursor.previous() )
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
IndexEntry<?,ServerEntry> candidate = ndnIdxCursor.get();
if ( approximateEvaluator.evaluate( candidate ) )
{
@@ -222,7 +222,7 @@
while( ndnIdxCursor.next() )
{
- checkClosed( "next()" );
+ checkNotClosed( "next()" );
IndexEntry<?,ServerEntry> candidate = ndnIdxCursor.get();
if ( approximateEvaluator.evaluate( candidate ) )
{
@@ -237,7 +237,7 @@
@SuppressWarnings("unchecked")
public IndexEntry<V, ServerEntry> get() throws Exception
{
- checkClosed( "get()" );
+ checkNotClosed( "get()" );
if ( userIdxCursor != null )
{
return userIdxCursor.get();
Modified: directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityCursor.java?rev=687552&r1=687551&r2=687552&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityCursor.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityCursor.java Wed Aug 20 21:22:04 2008
@@ -93,7 +93,7 @@
public void beforeValue( Long id, V value ) throws Exception
{
- checkClosed( "beforeValue()" );
+ checkNotClosed( "beforeValue()" );
if ( userIdxCursor != null )
{
userIdxCursor.beforeValue( id, value );
@@ -107,7 +107,7 @@
public void before( IndexEntry<V, ServerEntry> element ) throws Exception
{
- checkClosed( "before()" );
+ checkNotClosed( "before()" );
if ( userIdxCursor != null )
{
userIdxCursor.before( element );
@@ -121,7 +121,7 @@
public void afterValue( Long id, V key ) throws Exception
{
- checkClosed( "afterValue()" );
+ checkNotClosed( "afterValue()" );
if ( userIdxCursor != null )
{
userIdxCursor.afterValue( id, key );
@@ -135,7 +135,7 @@
public void after( IndexEntry<V, ServerEntry> element ) throws Exception
{
- checkClosed( "after()" );
+ checkNotClosed( "after()" );
if ( userIdxCursor != null )
{
userIdxCursor.after( element );
@@ -149,7 +149,7 @@
public void beforeFirst() throws Exception
{
- checkClosed( "beforeFirst()" );
+ checkNotClosed( "beforeFirst()" );
if ( userIdxCursor != null )
{
userIdxCursor.beforeFirst();
@@ -164,7 +164,7 @@
public void afterLast() throws Exception
{
- checkClosed( "afterLast()" );
+ checkNotClosed( "afterLast()" );
if ( userIdxCursor != null )
{
userIdxCursor.afterLast();
@@ -201,7 +201,7 @@
while( ndnIdxCursor.previous() )
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
IndexEntry<?,ServerEntry> candidate = ndnIdxCursor.get();
if ( equalityEvaluator.evaluate( candidate ) )
{
@@ -223,7 +223,7 @@
while( ndnIdxCursor.next() )
{
- checkClosed( "next()" );
+ checkNotClosed( "next()" );
IndexEntry<?,ServerEntry> candidate = ndnIdxCursor.get();
if ( equalityEvaluator.evaluate( candidate ) )
{
@@ -238,7 +238,7 @@
@SuppressWarnings("unchecked")
public IndexEntry<V, ServerEntry> get() throws Exception
{
- checkClosed( "get()" );
+ checkNotClosed( "get()" );
if ( userIdxCursor != null )
{
return userIdxCursor.get();
Modified: directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqCursor.java?rev=687552&r1=687551&r2=687552&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqCursor.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqCursor.java Wed Aug 20 21:22:04 2008
@@ -88,7 +88,7 @@
@SuppressWarnings("unchecked")
public void beforeValue( Long id, V value ) throws Exception
{
- checkClosed( "beforeValue()" );
+ checkNotClosed( "beforeValue()" );
if ( userIdxCursor != null )
{
/*
@@ -119,7 +119,7 @@
@SuppressWarnings("unchecked")
public void afterValue( Long id, V value ) throws Exception
{
- checkClosed( "afterValue()" );
+ checkNotClosed( "afterValue()" );
if ( userIdxCursor != null )
{
int comparedValue = greaterEqEvaluator.getComparator().compare( value,
@@ -159,7 +159,7 @@
@SuppressWarnings("unchecked")
public void before( IndexEntry<V, ServerEntry> element ) throws Exception
{
- checkClosed( "before()" );
+ checkNotClosed( "before()" );
if ( userIdxCursor != null )
{
/*
@@ -190,7 +190,7 @@
@SuppressWarnings("unchecked")
public void after( IndexEntry<V, ServerEntry> element ) throws Exception
{
- checkClosed( "after()" );
+ checkNotClosed( "after()" );
if ( userIdxCursor != null )
{
int comparedValue = greaterEqEvaluator.getComparator().compare( element.getValue(),
@@ -230,7 +230,7 @@
@SuppressWarnings("unchecked")
public void beforeFirst() throws Exception
{
- checkClosed( "beforeFirst()" );
+ checkNotClosed( "beforeFirst()" );
if ( userIdxCursor != null )
{
IndexEntry<V,ServerEntry> advanceTo = new ForwardIndexEntry<V,ServerEntry>();
@@ -249,7 +249,7 @@
public void afterLast() throws Exception
{
- checkClosed( "afterLast()" );
+ checkNotClosed( "afterLast()" );
if ( userIdxCursor != null )
{
userIdxCursor.afterLast();
@@ -281,7 +281,7 @@
@SuppressWarnings("unchecked")
public boolean previous() throws Exception
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
if ( userIdxCursor != null )
{
/*
@@ -290,7 +290,7 @@
*/
while ( userIdxCursor.previous() )
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
IndexEntry<?,ServerEntry> candidate = userIdxCursor.get();
if ( greaterEqEvaluator.getComparator().compare( candidate.getValue(), greaterEqEvaluator.getExpression().getValue().get() ) >= 0 )
{
@@ -303,7 +303,7 @@
while( ndnIdxCursor.previous() )
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
ndnCandidate = ndnIdxCursor.get();
if ( greaterEqEvaluator.evaluate( ndnCandidate ) )
{
@@ -317,7 +317,7 @@
public boolean next() throws Exception
{
- checkClosed( "next()" );
+ checkNotClosed( "next()" );
if ( userIdxCursor != null )
{
/*
@@ -329,7 +329,7 @@
while( ndnIdxCursor.next() )
{
- checkClosed( "next()" );
+ checkNotClosed( "next()" );
ndnCandidate = ndnIdxCursor.get();
if ( greaterEqEvaluator.evaluate( ndnCandidate ) )
{
@@ -344,7 +344,7 @@
@SuppressWarnings("unchecked")
public IndexEntry<V, ServerEntry> get() throws Exception
{
- checkClosed( "get()" );
+ checkNotClosed( "get()" );
if ( userIdxCursor != null )
{
if ( available )
Modified: directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqCursor.java?rev=687552&r1=687551&r2=687552&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqCursor.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqCursor.java Wed Aug 20 21:22:04 2008
@@ -87,7 +87,7 @@
public void beforeValue( Long id, V value ) throws Exception
{
- checkClosed( "beforeValue()" );
+ checkNotClosed( "beforeValue()" );
if ( userIdxCursor != null )
{
/*
@@ -133,7 +133,7 @@
@SuppressWarnings("unchecked")
public void before( IndexEntry<V, ServerEntry> element ) throws Exception
{
- checkClosed( "before()" );
+ checkNotClosed( "before()" );
if ( userIdxCursor != null )
{
/*
@@ -178,7 +178,7 @@
@SuppressWarnings("unchecked")
public void afterValue( Long id, V value ) throws Exception
{
- checkClosed( "afterValue()" );
+ checkNotClosed( "afterValue()" );
if ( userIdxCursor != null )
{
int comparedValue = lessEqEvaluator.getComparator().compare( value,
@@ -215,7 +215,7 @@
@SuppressWarnings("unchecked")
public void after( IndexEntry<V, ServerEntry> element ) throws Exception
{
- checkClosed( "after()" );
+ checkNotClosed( "after()" );
if ( userIdxCursor != null )
{
int comparedValue = lessEqEvaluator.getComparator().compare( element.getValue(),
@@ -251,7 +251,7 @@
public void beforeFirst() throws Exception
{
- checkClosed( "beforeFirst()" );
+ checkNotClosed( "beforeFirst()" );
if ( userIdxCursor != null )
{
userIdxCursor.beforeFirst();
@@ -268,7 +268,7 @@
public void afterLast() throws Exception
{
- checkClosed( "afterLast()" );
+ checkNotClosed( "afterLast()" );
if ( userIdxCursor != null )
{
IndexEntry<V,ServerEntry> advanceTo = new ForwardIndexEntry<V,ServerEntry>();
@@ -302,7 +302,7 @@
public boolean previous() throws Exception
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
if ( userIdxCursor != null )
{
@@ -316,7 +316,7 @@
while( ndnIdxCursor.previous() )
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
ndnCandidate = ndnIdxCursor.get();
if ( lessEqEvaluator.evaluate( ndnCandidate ) )
{
@@ -335,7 +335,7 @@
@SuppressWarnings("unchecked")
public boolean next() throws Exception
{
- checkClosed( "next()" );
+ checkNotClosed( "next()" );
if ( userIdxCursor != null )
{
/*
@@ -346,7 +346,7 @@
*/
while ( userIdxCursor.next() )
{
- checkClosed( "next()" );
+ checkNotClosed( "next()" );
IndexEntry<?,ServerEntry> candidate = userIdxCursor.get();
if ( lessEqEvaluator.getComparator().compare( candidate.getValue(),
lessEqEvaluator.getExpression().getValue().get() ) <= 0 )
@@ -360,7 +360,7 @@
while( ndnIdxCursor.next() )
{
- checkClosed( "next()" );
+ checkNotClosed( "next()" );
ndnCandidate = ndnIdxCursor.get();
if ( lessEqEvaluator.evaluate( ndnCandidate ) )
{
@@ -378,7 +378,7 @@
public IndexEntry<V, ServerEntry> get() throws Exception
{
- checkClosed( "get()" );
+ checkNotClosed( "get()" );
if ( userIdxCursor != null )
{
if ( available )
Modified: directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/NotCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/NotCursor.java?rev=687552&r1=687551&r2=687552&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/NotCursor.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/NotCursor.java Wed Aug 20 21:22:04 2008
@@ -86,7 +86,7 @@
public void beforeFirst() throws Exception
{
- checkClosed( "beforeFirst()" );
+ checkNotClosed( "beforeFirst()" );
ndnCursor.beforeFirst();
available = false;
}
@@ -94,7 +94,7 @@
public void afterLast() throws Exception
{
- checkClosed( "afterLast()" );
+ checkNotClosed( "afterLast()" );
ndnCursor.afterLast();
available = false;
}
@@ -118,7 +118,7 @@
{
while ( ndnCursor.previous() )
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
IndexEntry<?,ServerEntry> candidate = ndnCursor.get();
if ( ! childEvaluator.evaluate( candidate ) )
{
@@ -134,7 +134,7 @@
{
while ( ndnCursor.next() )
{
- checkClosed( "next()" );
+ checkNotClosed( "next()" );
IndexEntry<?,ServerEntry> candidate = ndnCursor.get();
if ( ! childEvaluator.evaluate( candidate ) )
{
@@ -148,7 +148,7 @@
public IndexEntry<V, ServerEntry> get() throws Exception
{
- checkClosed( "get()" );
+ checkNotClosed( "get()" );
if ( available )
{
return ndnCursor.get();
Modified: directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeCursor.java?rev=687552&r1=687551&r2=687552&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeCursor.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeCursor.java Wed Aug 20 21:22:04 2008
@@ -119,7 +119,7 @@
public void beforeFirst() throws Exception
{
- checkClosed( "beforeFirst()" );
+ checkNotClosed( "beforeFirst()" );
cursor = scopeCursor;
cursor.beforeFirst();
available = false;
@@ -128,7 +128,7 @@
public void afterLast() throws Exception
{
- checkClosed( "afterLast()" );
+ checkNotClosed( "afterLast()" );
if ( evaluator.isDereferencing() )
{
cursor = dereferencedCursor;
@@ -159,7 +159,7 @@
public boolean previous() throws Exception
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
// if the cursor has not been set - position it after last element
if ( cursor == null )
{
@@ -178,7 +178,7 @@
// advance until nothing is available or until we find a non-alias
do
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
available = cursor.previous();
if ( available && db.getAliasIndex().reverseLookup( cursor.get().getId() ) == null )
@@ -211,7 +211,7 @@
// advance until nothing is available or until we find a non-alias
do
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
available = cursor.previous();
if ( available && db.getAliasIndex().reverseLookup( cursor.get().getId() ) == null )
@@ -230,7 +230,7 @@
public boolean next() throws Exception
{
- checkClosed( "next()" );
+ checkNotClosed( "next()" );
// if the cursor hasn't been set position it before the first element
if ( cursor == null )
{
@@ -246,7 +246,7 @@
// advance until nothing is available or until we find a non-alias
do
{
- checkClosed( "next()" );
+ checkNotClosed( "next()" );
available = cursor.next();
if ( available && db.getAliasIndex().reverseLookup( cursor.get().getId() ) == null )
@@ -291,7 +291,7 @@
public IndexEntry<Long, ServerEntry> get() throws Exception
{
- checkClosed( "get()" );
+ checkNotClosed( "get()" );
if ( available )
{
return cursor.get();
Modified: directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/OrCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/OrCursor.java?rev=687552&r1=687551&r2=687552&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/OrCursor.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/OrCursor.java Wed Aug 20 21:22:04 2008
@@ -102,7 +102,7 @@
public void beforeFirst() throws Exception
{
- checkClosed( "beforeFirst()" );
+ checkNotClosed( "beforeFirst()" );
cursorIndex = 0;
cursors.get( cursorIndex ).beforeFirst();
available = false;
@@ -111,7 +111,7 @@
public void afterLast() throws Exception
{
- checkClosed( "afterLast()" );
+ checkNotClosed( "afterLast()" );
cursorIndex = cursors.size() - 1;
cursors.get( cursorIndex ).afterLast();
available = false;
@@ -166,7 +166,7 @@
{
while ( cursors.get( cursorIndex ).previous() )
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
IndexEntry<?,ServerEntry> candidate = cursors.get( cursorIndex ).get();
if ( ! isBlackListed( candidate.getId() ) )
{
@@ -177,13 +177,13 @@
while ( cursorIndex > 0 )
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
cursorIndex--;
cursors.get( cursorIndex ).afterLast();
while ( cursors.get( cursorIndex ).previous() )
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
IndexEntry<?,ServerEntry> candidate = cursors.get( cursorIndex ).get();
if ( ! isBlackListed( candidate.getId() ) )
{
@@ -201,7 +201,7 @@
{
while ( cursors.get( cursorIndex ).next() )
{
- checkClosed( "next()" );
+ checkNotClosed( "next()" );
IndexEntry<?,ServerEntry> candidate = cursors.get( cursorIndex ).get();
if ( ! isBlackListed( candidate.getId() ) )
{
@@ -212,13 +212,13 @@
while ( cursorIndex < cursors.size() - 1 )
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
cursorIndex++;
cursors.get( cursorIndex ).beforeFirst();
while ( cursors.get( cursorIndex ).next() )
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
IndexEntry<?,ServerEntry> candidate = cursors.get( cursorIndex ).get();
if ( ! isBlackListed( candidate.getId() ) )
{
@@ -234,7 +234,7 @@
public IndexEntry<V, ServerEntry> get() throws Exception
{
- checkClosed( "get()" );
+ checkNotClosed( "get()" );
if ( available )
{
return cursors.get( cursorIndex ).get();
Modified: directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceCursor.java?rev=687552&r1=687551&r2=687552&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceCursor.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceCursor.java Wed Aug 20 21:22:04 2008
@@ -76,7 +76,7 @@
public void beforeValue( Long id, String value ) throws Exception
{
- checkClosed( "beforeValue()" );
+ checkNotClosed( "beforeValue()" );
if ( presenceCursor != null )
{
presenceCursor.beforeValue( id, value );
@@ -89,7 +89,7 @@
public void before( IndexEntry<String, ServerEntry> element ) throws Exception
{
- checkClosed( "before()" );
+ checkNotClosed( "before()" );
if ( presenceCursor != null )
{
presenceCursor.before( element );
@@ -102,7 +102,7 @@
public void afterValue( Long id, String value ) throws Exception
{
- checkClosed( "afterValue()" );
+ checkNotClosed( "afterValue()" );
if ( presenceCursor != null )
{
presenceCursor.afterValue( id, value );
@@ -115,7 +115,7 @@
public void after( IndexEntry<String, ServerEntry> element ) throws Exception
{
- checkClosed( "after()" );
+ checkNotClosed( "after()" );
if ( presenceCursor != null )
{
presenceCursor.after( element );
@@ -128,7 +128,7 @@
public void beforeFirst() throws Exception
{
- checkClosed( "beforeFirst()" );
+ checkNotClosed( "beforeFirst()" );
if ( presenceCursor != null )
{
presenceCursor.beforeFirst();
@@ -142,7 +142,7 @@
public void afterLast() throws Exception
{
- checkClosed( "afterLast()" );
+ checkNotClosed( "afterLast()" );
if ( presenceCursor != null )
{
presenceCursor.afterLast();
@@ -156,7 +156,7 @@
public boolean first() throws Exception
{
- checkClosed( "first()" );
+ checkNotClosed( "first()" );
if ( presenceCursor != null )
{
return presenceCursor.first();
@@ -169,7 +169,7 @@
public boolean last() throws Exception
{
- checkClosed( "last()" );
+ checkNotClosed( "last()" );
if ( presenceCursor != null )
{
return presenceCursor.last();
@@ -182,7 +182,7 @@
public boolean previous() throws Exception
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
if ( presenceCursor != null )
{
return presenceCursor.previous();
@@ -190,7 +190,7 @@
while ( ndnCursor.previous() )
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
IndexEntry<?,ServerEntry> candidate = ndnCursor.get();
if ( presenceEvaluator.evaluate( candidate ) )
{
@@ -204,7 +204,7 @@
public boolean next() throws Exception
{
- checkClosed( "next()" );
+ checkNotClosed( "next()" );
if ( presenceCursor != null )
{
return presenceCursor.next();
@@ -212,7 +212,7 @@
while ( ndnCursor.next() )
{
- checkClosed( "next()" );
+ checkNotClosed( "next()" );
IndexEntry<?,ServerEntry> candidate = ndnCursor.get();
if ( presenceEvaluator.evaluate( candidate ) )
{
@@ -226,7 +226,7 @@
public IndexEntry<String, ServerEntry> get() throws Exception
{
- checkClosed( "get()" );
+ checkNotClosed( "get()" );
if ( presenceCursor != null )
{
if ( presenceCursor.available() )
Modified: directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringCursor.java?rev=687552&r1=687551&r2=687552&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringCursor.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringCursor.java Wed Aug 20 21:22:04 2008
@@ -105,7 +105,7 @@
public void beforeFirst() throws Exception
{
- checkClosed( "beforeFirst()" );
+ checkNotClosed( "beforeFirst()" );
if ( evaluator.getExpression().getInitial() != null && hasIndex )
{
ForwardIndexEntry<String,ServerEntry> indexEntry = new ForwardIndexEntry<String,ServerEntry>();
@@ -132,7 +132,7 @@
public void afterLast() throws Exception
{
- checkClosed( "afterLast()" );
+ checkNotClosed( "afterLast()" );
// to keep the cursor always *after* the last matched tuple
// This fixes an issue if the last matched tuple is also the last record present in the
@@ -173,7 +173,7 @@
{
while ( wrapped.previous() )
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
IndexEntry<String,ServerEntry> entry = wrapped.get();
if ( evaluateCandidate( entry ) )
{
@@ -194,7 +194,7 @@
{
while ( wrapped.next() )
{
- checkClosed( "next()" );
+ checkNotClosed( "next()" );
IndexEntry<String,ServerEntry> entry = wrapped.get();
if ( evaluateCandidate( entry ) )
{
@@ -213,7 +213,7 @@
public IndexEntry<String, ServerEntry> get() throws Exception
{
- checkClosed( "get()" );
+ checkNotClosed( "get()" );
if ( available )
{
return indexEntry;
Modified: directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeCursor.java?rev=687552&r1=687551&r2=687552&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeCursor.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeCursor.java Wed Aug 20 21:22:04 2008
@@ -123,7 +123,7 @@
public void beforeFirst() throws Exception
{
- checkClosed( "beforeFirst()" );
+ checkNotClosed( "beforeFirst()" );
cursor = scopeCursor;
cursor.beforeFirst();
available = false;
@@ -132,7 +132,7 @@
public void afterLast() throws Exception
{
- checkClosed( "afterLast()" );
+ checkNotClosed( "afterLast()" );
if ( evaluator.isDereferencing() )
{
cursor = dereferencedCursor;
@@ -163,7 +163,7 @@
public boolean previous() throws Exception
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
// if the cursor has not been set - position it after last element
if ( cursor == null )
{
@@ -182,7 +182,7 @@
// advance until nothing is available or until we find a non-alias
do
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
available = cursor.previous();
if ( available && db.getAliasIndex().reverseLookup( cursor.get().getId() ) == null )
{
@@ -214,7 +214,7 @@
// advance until nothing is available or until we find a non-alias
do
{
- checkClosed( "previous()" );
+ checkNotClosed( "previous()" );
available = cursor.previous();
if ( available && db.getAliasIndex().reverseLookup( cursor.get().getId() ) == null )
@@ -233,7 +233,7 @@
public boolean next() throws Exception
{
- checkClosed( "next()" );
+ checkNotClosed( "next()" );
// if the cursor hasn't been set position it before the first element
if ( cursor == null )
{
@@ -249,7 +249,7 @@
// advance until nothing is available or until we find a non-alias
do
{
- checkClosed( "next()" );
+ checkNotClosed( "next()" );
available = cursor.next();
if ( available && db.getAliasIndex().reverseLookup( cursor.get().getId() ) == null )
@@ -294,7 +294,7 @@
public IndexEntry<Long, ServerEntry> get() throws Exception
{
- checkClosed( "get()" );
+ checkNotClosed( "get()" );
if ( available )
{
return cursor.get();