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.NodeFunction
Node 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 class
EventFunction.InputValue
static class
EventFunction.OutputValue
-
Field Summary
Fields Modifier and Type Field Description protected int
m_processorId
The ID of the processor which produces the eventprotected int
m_streamIndex
The index of the output stream on the processorprotected int
m_streamPosition
The position in the stream where the event isprotected static ca.uqac.lif.petitpoucet.DirectValue
s_dependencyFunction
An instance of theDirectValue
node function.
-
Constructor Summary
Constructors Modifier Constructor Description protected
EventFunction()
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.NodeFunction
dependsOn()
int
getProcessorId()
Gets the processor ID associated to this event functionint
getStreamIndex()
Gets the stream index associated to this event functionint
getStreamPosition()
Gets the stream position associated to this event functionjava.lang.String
toString()
-
-
-
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 theDirectValue
node 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:
toString
in classjava.lang.Object
-
dependsOn
public ca.uqac.lif.petitpoucet.NodeFunction dependsOn()
- Specified by:
dependsOn
in interfaceca.uqac.lif.petitpoucet.NodeFunction
-
getProcessorId
public int getProcessorId()
Gets the processor ID associated to this event function- Specified by:
getProcessorId
in interfaceca.uqac.lif.cep.EventNodeFunction
- Returns:
- The ID
-
getStreamIndex
public int getStreamIndex()
Gets the stream index associated to this event function- Specified by:
getStreamIndex
in interfaceca.uqac.lif.cep.EventNodeFunction
- Returns:
- The index
-
getStreamPosition
public int getStreamPosition()
Gets the stream position associated to this event function- Specified by:
getStreamPosition
in interfaceca.uqac.lif.cep.EventNodeFunction
- Returns:
- The position
-
-