org.apache.directory.server.xdbm
Interface TupleCursor<K,V>

All Superinterfaces:
org.apache.directory.shared.ldap.cursor.Cursor<Tuple<K,V>>, java.lang.Iterable<Tuple<K,V>>
All Known Implementing Classes:
AbstractTupleCursor, AvlSingletonOrOrderedSetCursor, AvlTableDupsCursor, AvlTreeMapNoDupsWrapperCursor, DupsContainerCursor, KeyTupleArrayCursor, KeyTupleAvlCursor, KeyTupleBTreeCursor

public interface TupleCursor<K,V>
extends org.apache.directory.shared.ldap.cursor.Cursor<Tuple<K,V>>

A Cursor introducing new advance methods designed to reduce some inefficiencies encountered when scanning over Tuples.

Version:
$$Rev$$
Author:
Apache Directory Project

Method Summary
 void afterKey(K key)
          An alternative to calling after(Tuple) which often may require wrapping a key in a newly created Tuple object that may be unnecessary.
 void afterValue(K key, V value)
          An alternative to calling after(Tuple) which often may require wrapping a key and a value in a newly created Tuple object that may be unnecessary.
 void beforeKey(K key)
          An alternative to calling before(Tuple) which often may require wrapping a key in a newly created Tuple object that may be unnecessary.
 void beforeValue(K key, V value)
          An alternative to calling before(Tuple) which often may require wrapping a key and a value in a newly created Tuple object that may be unnecessary.
 
Methods inherited from interface org.apache.directory.shared.ldap.cursor.Cursor
after, afterLast, available, before, beforeFirst, close, close, first, get, isClosed, isElementReused, last, next, previous, setClosureMonitor
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

beforeKey

void beforeKey(K key)
               throws java.lang.Exception
An alternative to calling before(Tuple) which often may require wrapping a key in a newly created Tuple object that may be unnecessary. This method behaves just like before(Tuple) except it advances to just before the first value of the key.

Parameters:
key - the key to advance just before
Throws:
java.lang.Exception - if there are faults peforming this operation

afterKey

void afterKey(K key)
              throws java.lang.Exception
An alternative to calling after(Tuple) which often may require wrapping a key in a newly created Tuple object that may be unnecessary. This method behaves just like after(Tuple) except it advances to just after the last value of the key.

Parameters:
key - the key to advance just after the last value
Throws:
java.lang.Exception - if there are faults peforming this operation

beforeValue

void beforeValue(K key,
                 V value)
                 throws java.lang.Exception
An alternative to calling before(Tuple) which often may require wrapping a key and a value in a newly created Tuple object that may be unnecessary. This method behaves just like before(Tuple) except it advances to just before the value of the key which may still be of the same key. This method will not be supported if duplicate keys are not supported. In this case an UnsupportedOperationException will be thrown.

Parameters:
key - the key of the value to advance just before
value - the value to advance just before
Throws:
java.lang.UnsupportedOperationException - if duplicate keys not supporrted
java.lang.Exception - if there are faults peforming this operation

afterValue

void afterValue(K key,
                V value)
                throws java.lang.Exception
An alternative to calling after(Tuple) which often may require wrapping a key and a value in a newly created Tuple object that may be unnecessary. This method behaves just like after(Tuple) except it advances to just after the value with the specified key. This method will not be supported if duplicate keys are not supported. In this case an UnsupportedOperationException will be thrown.

Parameters:
key - the key of the value to advance just after
value - the value to advance just after
Throws:
java.lang.UnsupportedOperationException - if duplicate keys not supporrted
java.lang.Exception - if there are faults peforming this operation


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.