messif.buckets.storage
Interface LongStorageSearch<T>

Type Parameters:
T - the type of objects that are looked up
All Superinterfaces:
java.lang.Cloneable, ModifiableSearch<T>, Removable<T>, Search<T>, StorageSearch<T>

public interface LongStorageSearch<T>
extends StorageSearch<T>

This interface represents a ModifiableSearch that supports getting LongStorage's address of the found object.


Method Summary
 LongAddress<T> getCurrentObjectAddress()
          Returns the address of the object found by the last search.
 long getCurrentObjectLongAddress()
          Returns the address of the object found by the last search.
 
Methods inherited from interface messif.buckets.index.Search
clone, close, getCurrentObject, next, previous, skip
 
Methods inherited from interface messif.buckets.Removable
getCurrentObject, remove
 

Method Detail

getCurrentObjectLongAddress

long getCurrentObjectLongAddress()
                                 throws java.lang.IllegalStateException
Returns the address of the object found by the last search. That is, if method Search.next() or Search.previous() has returned true, this method returns the address of the matching object. If false has been returned, this method throws an IllegalStateException.

Note that even though the address can be used to retrieve the actual object, the Search.getCurrentObject() should be used instead, since it is usually faster.

Returns:
the address of the object found by the last search
Throws:
java.lang.IllegalStateException - if there is no current object (next/previous method was not called or returned false)

getCurrentObjectAddress

LongAddress<T> getCurrentObjectAddress()
                                       throws java.lang.IllegalStateException
Description copied from interface: StorageSearch
Returns the address of the object found by the last search. That is, if method Search.next() or Search.previous() has returned true, this method returns the address of the matching object. If false has been returned, this method throws an IllegalStateException.

Note that even though the address can be used to retrieve the actual object, the Search.getCurrentObject() should be used instead, since it is usually faster.

Specified by:
getCurrentObjectAddress in interface StorageSearch<T>
Returns:
the address of the object found by the last search
Throws:
java.lang.IllegalStateException - if there is no current object (next/previous method was not called or returned false)