com.espertech.esper.view
Class ZeroDepthStreamIterable

java.lang.Object
  extended by com.espertech.esper.view.ZeroDepthStreamIterable
All Implemented Interfaces:
EventCollection, EventStream, Viewable, java.lang.Iterable<EventBean>

public final class ZeroDepthStreamIterable
extends java.lang.Object
implements EventStream

Event stream implementation that does not keep any window by itself of the events coming into the stream, however is itself iterable and keeps the last event.


Constructor Summary
ZeroDepthStreamIterable(EventType eventType)
          Ctor.
 
Method Summary
 View addView(View view)
          Add a view to the viewable object.
 EventType getEventType()
          Provides metadata information about the type of object the event collection contains.
 View[] getViews()
          Returns all added views.
 boolean hasViews()
          Test is there are any views to the Viewable.
 void insert(EventBean theEvent)
          Insert a new event onto the stream.
 void insert(EventBean[] events)
          Insert new events onto the stream.
 java.util.Iterator<EventBean> iterator()
          Allows iteration through all elements in this event collection.
 void removeAllViews()
          Remove all views.
 boolean removeView(View view)
          Remove a view.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZeroDepthStreamIterable

public ZeroDepthStreamIterable(EventType eventType)
Ctor.

Parameters:
eventType - - type of event
Method Detail

insert

public void insert(EventBean[] events)
Description copied from interface: EventStream
Insert new events onto the stream.

Specified by:
insert in interface EventStream
Parameters:
events - to insert

insert

public final void insert(EventBean theEvent)
Description copied from interface: EventStream
Insert a new event onto the stream.

Specified by:
insert in interface EventStream
Parameters:
theEvent - to insert

getEventType

public final EventType getEventType()
Description copied from interface: EventCollection
Provides metadata information about the type of object the event collection contains.

Specified by:
getEventType in interface EventCollection
Returns:
metadata for the objects in the collection

iterator

public final java.util.Iterator<EventBean> iterator()
Description copied from interface: EventCollection
Allows iteration through all elements in this event collection. The iterator will return the elements in the collection in their natural order, or, if there is no natural ordering, in some unpredictable order.

Specified by:
iterator in interface EventCollection
Specified by:
iterator in interface java.lang.Iterable<EventBean>
Returns:
an iterator which will go through all current elements in the collection.

addView

public final View addView(View view)
Description copied from interface: Viewable
Add a view to the viewable object.

Specified by:
addView in interface Viewable
Parameters:
view - to add
Returns:
view to add

getViews

public final View[] getViews()
Description copied from interface: Viewable
Returns all added views.

Specified by:
getViews in interface Viewable
Returns:
list of added views

removeView

public final boolean removeView(View view)
Description copied from interface: Viewable
Remove a view.

Specified by:
removeView in interface Viewable
Parameters:
view - to remove
Returns:
true to indicate that the view to be removed existed within this view, false if the view to remove could not be found

hasViews

public final boolean hasViews()
Description copied from interface: Viewable
Test is there are any views to the Viewable.

Specified by:
hasViews in interface Viewable
Returns:
true indicating there are child views, false indicating there are no child views

removeAllViews

public void removeAllViews()
Description copied from interface: Viewable
Remove all views.

Specified by:
removeAllViews in interface Viewable

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com