|
Servertec Persistent Object Store 1.4.1 09/04/2005 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ObjectStoreEnumeration
Defines interface for accessing a series of elements representing keys or values contained in the persistent object store.
Unlike java.util.Enumeration, java.util.Enumeration nextElement() does not move the cursor to the next element, hasMoreElement() does.
If locking is enabled then hasMoreElement() will first unlock any key that was locked by the last call to hasMoreElements() and then it will attempt to lock the next key before it returns.
If locking is enabled then when an enumeration is closed or finalized it will unlock the last key that was locked by the last call to hasMoreElements().
elements
,
elements
,
elements
,
elements
,
keys
,
keys
,
keys
,
keys
,
elements
,
elements
,
elements
,
elements
,
keys
,
keys
,
keys
,
keys
,
ObjectStoreEnumerationFilter
,
Enumeration
Method Summary | |
---|---|
void |
close()
Closes this enumeration. |
boolean |
hasMoreElements()
Returns whether the current enumeration contains any more keys or values. |
boolean |
hasMoreElements(long timeout)
Returns whether the current enumeration contains any more keys or values. |
boolean |
isOpen()
Returns whether this enumeration is still open. |
java.lang.Object |
nextElement()
Returns the next element. |
Method Detail |
---|
boolean hasMoreElements() throws java.io.IOException
Internally finds the next element, moving the cursor as needed.
If locking is enabled then hasMoreElement() will first unlock any key that was locked by the last call to hasMoreElements() and then it will attempt to lock the next key before it returns.
If the next key is already locked by another reference then this method will roadblock until the key can be locked.
java.io.IOException
- if an I/O exception occurred.boolean hasMoreElements(long timeout) throws java.io.IOException, TimeoutException
Internally finds the next element, moving the cursor as needed.
If locking is enabled then hasMoreElement() will first unlock any key that was locked by last call to hasMoreElements() and then it will attempt to lock the next key before it returns.
If the next key is already locked by another reference then this method will roadblock until the key can be locked or timeout occurs.
If TimeoutException is thrown then nextElement() returns the element that is waiting to be locked.
timeout
- the number of milliseconds to wait for the next key to be locked before giving up and throwing TimeoutException. -1 for unlimited.
TimeoutException
- if the next key could not be locked in the time specified.
java.io.IOException
- if an I/O exception occurred.java.lang.Object nextElement() throws java.io.IOException, java.util.NoSuchElementException
Does not move the cursor to the next element, hasMoreElements() does.
Repeated calls without, first calling hasMoreElements(), will return the same element.
Returns the element that is waiting to be locked when hasMoreElements(long) throws a TimeoutException.
java.util.NoSuchElementException
- if no more elements were available.
java.io.IOException
- if an I/O exception occurred.void close() throws java.io.IOException
If locking was enabled then this method unlocks the last key that was locked by the last call to hasMoreElements().
This method must be called if locking is enabled.
java.io.IOException
- if an I/O exception occurred.boolean isOpen() throws java.io.IOException
java.io.IOException
- if an I/O exception occurred.
|
Servertec Persistent Object Store 1.4.1 09/04/2005 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2001-2005 Servertec. All rights reserved.