| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@InterfaceAudience.Public @InterfaceStability.Evolving public interface EventDeserializer
Establishes a contract for reading events stored in arbitrary formats from reliable, resettable streams.
| Nested Class Summary | |
|---|---|
| static interface | EventDeserializer.BuilderKnows how to construct this deserializer. Note: Implementations MUST provide a public a no-arg constructor. | 
| Method Summary | |
|---|---|
|  void | close()Calls reset()on the stream and then closes it. | 
|  void | mark()Marks the underlying input stream, indicating that the events previously returned by this EventDeserializer have been successfully committed. | 
|  Event | readEvent()Read a single event from the underlying stream. | 
|  List<Event> | readEvents(int numEvents)Read a batch of events from the underlying stream. | 
|  void | reset()Resets the underlying input stream to the last known mark (or beginning of the stream if mark()was never previously called. | 
| Method Detail | 
|---|
Event readEvent()
                throws IOException
null if no events could be read.
IOExceptionmark(), 
reset()
List<Event> readEvents(int numEvents)
                       throws IOException
numEvents - Maximum number of events to return.
IOExceptionmark(), 
reset()
void mark()
          throws IOException
mark in interface ResettableIOExceptionreset()
void reset()
           throws IOException
mark() was never previously called. This should
 be done in the case of inability to commit previously-deserialized events.
reset in interface ResettableIOExceptionmark()
void close()
           throws IOException
reset() on the stream and then closes it.
 In the case of successful completion of event consumption,
 mark() MUST be called before close().
close in interface CloseableIOExceptionmark(), 
reset()| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||