Package io.siddhi.core.event.state
Class StateEvent
- java.lang.Object
-
- io.siddhi.core.event.state.StateEvent
-
- All Implemented Interfaces:
ComplexEvent,Serializable
- Direct Known Subclasses:
FinderStateEvent
public class StateEvent extends Object implements ComplexEvent
Implementation of StateEvent to be used when executing join/pattern queries- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.siddhi.core.event.ComplexEvent
ComplexEvent.Type
-
-
Field Summary
Fields Modifier and Type Field Description protected StateEventnextprotected Object[]outputDataprotected StreamEvent[]streamEventsprotected longtimestampprotected ComplexEvent.Typetype
-
Constructor Summary
Constructors Constructor Description StateEvent(int streamEventsSize, int outputSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEvent(int position, StreamEvent streamEvent)ObjectgetAttribute(int[] position)longgetId()StateEventgetNext()Object[]getOutputData()StreamEventgetStreamEvent(int position)StreamEventgetStreamEvent(int[] position)StreamEvent[]getStreamEvents()longgetTimestamp()ComplexEvent.TypegetType()voidremoveLastEvent(int position)voidsetAttribute(Object object, int[] position)voidsetEvent(int position, StreamEvent streamEvent)voidsetId(long id)voidsetNext(ComplexEvent stateEvent)voidsetOutputData(Object object, int index)voidsetTimestamp(long timestamp)voidsetType(ComplexEvent.Type type)StringtoString()
-
-
-
Field Detail
-
streamEvents
protected StreamEvent[] streamEvents
-
next
protected StateEvent next
-
timestamp
protected long timestamp
-
type
protected ComplexEvent.Type type
-
outputData
protected Object[] outputData
-
-
Method Detail
-
getStreamEvent
public StreamEvent getStreamEvent(int position)
-
getStreamEvents
public StreamEvent[] getStreamEvents()
-
getNext
public StateEvent getNext()
- Specified by:
getNextin interfaceComplexEvent
-
setNext
public void setNext(ComplexEvent stateEvent)
- Specified by:
setNextin interfaceComplexEvent
-
setOutputData
public void setOutputData(Object object, int index)
- Specified by:
setOutputDatain interfaceComplexEvent
-
getAttribute
public Object getAttribute(int[] position)
- Specified by:
getAttributein interfaceComplexEvent- Parameters:
position- int array of 3 or 4 elements int array of 3 : position[0]-which element of the streamEventSize array, position[1]-BeforeWindowData or OutputData or AfterWindowData, position[2]- which attribute int array of 4 : position[0]-which element of the streamEventSize array, position[1]-which event of the event chain, position[3]- BeforeWindowData or OutputData or AfterWindowData, position[4]- which attribute- Returns:
- Attribute
-
setAttribute
public void setAttribute(Object object, int[] position)
- Specified by:
setAttributein interfaceComplexEvent
-
getStreamEvent
public StreamEvent getStreamEvent(int[] position)
-
getOutputData
public Object[] getOutputData()
- Specified by:
getOutputDatain interfaceComplexEvent
-
getTimestamp
public long getTimestamp()
- Specified by:
getTimestampin interfaceComplexEvent
-
setTimestamp
public void setTimestamp(long timestamp)
-
getType
public ComplexEvent.Type getType()
- Specified by:
getTypein interfaceComplexEvent
-
setType
public void setType(ComplexEvent.Type type)
- Specified by:
setTypein interfaceComplexEvent
-
setEvent
public void setEvent(int position, StreamEvent streamEvent)
-
addEvent
public void addEvent(int position, StreamEvent streamEvent)
-
removeLastEvent
public void removeLastEvent(int position)
-
getId
public long getId()
-
setId
public void setId(long id)
-
-