Package ca.uqac.lif.cep.provenance
Class EventFunction
- java.lang.Object
-
- ca.uqac.lif.cep.provenance.EventFunction
-
- All Implemented Interfaces:
ca.uqac.lif.cep.EventNodeFunction,ca.uqac.lif.petitpoucet.NodeFunction
- Direct Known Subclasses:
EventFunction.InputValue,EventFunction.OutputValue
public abstract class EventFunction extends java.lang.Object implements ca.uqac.lif.cep.EventNodeFunction, ca.uqac.lif.petitpoucet.NodeFunctionNode function that relates to an event at a specific position, in a specific stream of a specific processor.- Author:
- Sylvain Hallé
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEventFunction.InputValuestatic classEventFunction.OutputValue
-
Field Summary
Fields Modifier and Type Field Description protected intm_processorIdThe ID of the processor which produces the eventprotected intm_streamIndexThe index of the output stream on the processorprotected intm_streamPositionThe position in the stream where the event isprotected static ca.uqac.lif.petitpoucet.DirectValues_dependencyFunctionAn instance of theDirectValuenode function.
-
Constructor Summary
Constructors Modifier Constructor Description protectedEventFunction()Empty constructor.EventFunction(int id, int index, int position)Creates a new event function.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ca.uqac.lif.petitpoucet.NodeFunctiondependsOn()intgetProcessorId()Gets the processor ID associated to this event functionintgetStreamIndex()Gets the stream index associated to this event functionintgetStreamPosition()Gets the stream position associated to this event functionjava.lang.StringtoString()
-
-
-
Field Detail
-
m_processorId
protected int m_processorId
The ID of the processor which produces the event
-
m_streamIndex
protected int m_streamIndex
The index of the output stream on the processor
-
m_streamPosition
protected int m_streamPosition
The position in the stream where the event is
-
s_dependencyFunction
protected static final transient ca.uqac.lif.petitpoucet.DirectValue s_dependencyFunction
An instance of theDirectValuenode function. All objects of this class have this as their final dependency, so we create only one instance and reuse it every time.
-
-
Constructor Detail
-
EventFunction
protected EventFunction()
Empty constructor. Only there to support deserialization with Azrael.
-
EventFunction
public EventFunction(int id, int index, int position)Creates a new event function.- Parameters:
id- The ID of the processorindex- The index of the output stream on that processorposition- The position of the event in that stream
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
dependsOn
public ca.uqac.lif.petitpoucet.NodeFunction dependsOn()
- Specified by:
dependsOnin interfaceca.uqac.lif.petitpoucet.NodeFunction
-
getProcessorId
public int getProcessorId()
Gets the processor ID associated to this event function- Specified by:
getProcessorIdin interfaceca.uqac.lif.cep.EventNodeFunction- Returns:
- The ID
-
getStreamIndex
public int getStreamIndex()
Gets the stream index associated to this event function- Specified by:
getStreamIndexin interfaceca.uqac.lif.cep.EventNodeFunction- Returns:
- The index
-
getStreamPosition
public int getStreamPosition()
Gets the stream position associated to this event function- Specified by:
getStreamPositionin interfaceca.uqac.lif.cep.EventNodeFunction- Returns:
- The position
-
-