|
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 |
java.lang.Objectstec.xpos.ObjectStoreEnumerator
public final class ObjectStoreEnumerator
Internal class used by stec.xpos.ObjectStoreReference when implementing stec.pos.ObjectStoreEnumeration.
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public final boolean hasMoreElements() throws java.io.IOException, TimeoutException
ObjectStoreEnumeration
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.
hasMoreElements
in interface ObjectStoreEnumeration
java.io.IOException
- if an I/O exception occurred.
TimeoutException
public final boolean hasMoreElements(long timeout) throws java.io.IOException, TimeoutException
ObjectStoreEnumeration
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.
hasMoreElements
in interface ObjectStoreEnumeration
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.public final java.lang.Object nextElement() throws java.io.IOException, java.util.NoSuchElementException
ObjectStoreEnumeration
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.
nextElement
in interface ObjectStoreEnumeration
java.io.IOException
- if an I/O exception occurred.
java.util.NoSuchElementException
- if no more elements were available.public final boolean isOpen() throws java.io.IOException
ObjectStoreEnumeration
isOpen
in interface ObjectStoreEnumeration
java.io.IOException
- if an I/O exception occurred.public final void close() throws java.io.IOException
ObjectStoreEnumeration
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.
close
in interface ObjectStoreEnumeration
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.