|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
interface EventLogIterator
EventLogIterator
provides an abstraction for accessing
the events
stored on behalf of a particular registration. The methods closely
resemble the java.util.iterator interface with the
exception of the throws
clauses and the additional
destroy and add methods.
The semantics for this iterator are the same as java.util.Iterator
in that next and remove are intended to be called
in pairs.
Method Summary | |
---|---|
void |
add(RemoteEvent re)
Store the given RemoteEvent event. |
void |
destroy()
Destroy the collection of stored events. |
boolean |
hasNext()
Return true if there are any events in the collection and false otherwise. |
void |
moveAhead(Object cookie)
Effectively removes the last set of read events from the log. |
RemoteEvent |
next()
Return the next event in the collection. |
RemoteEventData[] |
readAhead(int maxEvents)
Return an array of RemoteEventData with a limit of maxEvents elements. |
void |
remove()
Remove the event at the iterator's current cursor position. |
Method Detail |
---|
void add(RemoteEvent re) throws IOException
IOException
- if an I/O errors occursboolean hasNext() throws IOException
IOException
- if an I/O errors occursRemoteEvent next() throws IOException, NoSuchElementException, ClassNotFoundException
IOException
- if an I/O errors occurs
NoSuchElementException
- if there are no available
RemoteEvent
s
ClassNotFoundException
- if there was a problem deserializing
the stored RemoteEvent
void remove() throws IOException
IOException
- if an I/O errors occursRemoteEventData[] readAhead(int maxEvents) throws IOException, ClassNotFoundException
maxEvents
- maximum number of events/elements to return
IOException
- if an I/O error occurs
ClassNotFoundException
- if a class for the serialized
object could not be found
NoSuchElementException
- if no event is availablevoid moveAhead(Object cookie) throws IOException
cookie
- object associated with event to read past. This object
should have been obtained from a previous call to readAhead
on this event log.
IOException
- if there was a problem advancing the read pointer.void destroy() throws IOException
IOException
- if an I/O errors occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |