Package ca.uqac.lif.cep.diagnostics
Class Derivation
java.lang.Object
ca.uqac.lif.cep.Processor
ca.uqac.lif.cep.SynchronousProcessor
ca.uqac.lif.cep.diagnostics.Derivation
- All Implemented Interfaces:
ca.uqac.lif.cep.Contextualizable,ca.uqac.lif.cep.Duplicable,ca.uqac.lif.cep.DuplicableProcessor
public class Derivation
extends ca.uqac.lif.cep.SynchronousProcessor
-
Nested Class Summary
Nested classes/interfaces inherited from class ca.uqac.lif.cep.SynchronousProcessor
ca.uqac.lif.cep.SynchronousProcessor.InputPushable, ca.uqac.lif.cep.SynchronousProcessor.OutputPullableNested classes/interfaces inherited from class ca.uqac.lif.cep.Processor
ca.uqac.lif.cep.Processor.InternalProcessorState -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ca.uqac.lif.cep.Processor[]protected ca.uqac.lif.cep.Pushable[]protected longFields inherited from class ca.uqac.lif.cep.SynchronousProcessor
m_inputPushables, m_outputPullables, m_tempQueueFields inherited from class ca.uqac.lif.cep.Processor
m_context, m_hasBeenNotifiedOfEndOfTrace, m_inputArity, m_inputPullables, m_inputQueues, m_notifiedEndOfTraceDownstream, m_outputArity, m_outputPushables, m_outputQueues, MAX_PULL_RETRIES, s_versionString -
Constructor Summary
ConstructorsConstructorDescriptionDerivation(long slowdown, ca.uqac.lif.cep.Processor... procs) Creates a new derivationDerivation(ca.uqac.lif.cep.Processor... procs) Creates a new derivation -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanduplicate(boolean with_state) reconnect(ca.uqac.lif.cep.Processor p1, int out_index, ca.uqac.lif.cep.Processor p2, int in_index) Reconnects p1 and p2 so as to place the current processor in-between.reconnect(ca.uqac.lif.cep.Processor p1, ca.uqac.lif.cep.Processor p2) Reconnects p1 and p2 so as to place the current processor in-between.voidstart()voidstop()Methods inherited from class ca.uqac.lif.cep.SynchronousProcessor
getPullableOutput, getPushableInputMethods inherited from class ca.uqac.lif.cep.Processor
allNotifiedEndOfTrace, allNull, copyInputQueue, copyOutputQueue, duplicate, duplicateInto, equals, getAt, getContext, getContext, getEmptyQueue, getId, getInputArity, getInputQueue, getInputType, getInputTypesFor, getOutputArity, getOutputQueue, getOutputType, getPullableInput, getPullableOutput, getPushableInput, getPushableOutput, hashCode, leftShift, newContext, onEndOfTrace, or, or, or, printState, readState, reset, rightShift, setContext, setContext, setPullableInput, setPushableOutput, startAll, stopAll
-
Field Details
-
m_processors
protected ca.uqac.lif.cep.Processor[] m_processors -
m_pushables
protected ca.uqac.lif.cep.Pushable[] m_pushables -
m_slowDown
protected long m_slowDown
-
-
Constructor Details
-
Derivation
public Derivation(long slowdown, ca.uqac.lif.cep.Processor... procs) Creates a new derivation- Parameters:
slowdown- Insert a pause between each processed event. This can be used to slow down the execution of a processor chain.procs- The processors connected to the derivation
-
Derivation
public Derivation(ca.uqac.lif.cep.Processor... procs) Creates a new derivation- Parameters:
procs- The processors connected to the derivation
-
-
Method Details
-
reconnect
Reconnects p1 and p2 so as to place the current processor in-between. That is, the output of p1 is sent to the derivation, and the output of the derivation is sent as the input of p2.- Parameters:
p1- The first processorp2- The second processor- Returns:
- This derivation
-
reconnect
public Derivation reconnect(ca.uqac.lif.cep.Processor p1, int out_index, ca.uqac.lif.cep.Processor p2, int in_index) Reconnects p1 and p2 so as to place the current processor in-between. That is, the output of p1 is sent to the derivation, and the output of the derivation is sent as the input of p2.- Parameters:
p1- The first processorout_index- The index of the first processor's output to connect to the derivationp2- The second processorin_index- The index of the second processor's input to connect to the derivation- Returns:
- This derivation
- Since:
- 0.8
-
start
public void start() throws ca.uqac.lif.cep.ProcessorException- Overrides:
startin classca.uqac.lif.cep.Processor- Throws:
ca.uqac.lif.cep.ProcessorException
-
stop
public void stop() throws ca.uqac.lif.cep.ProcessorException- Overrides:
stopin classca.uqac.lif.cep.Processor- Throws:
ca.uqac.lif.cep.ProcessorException
-
compute
protected boolean compute(Object[] inputs, Queue<Object[]> outputs) throws ca.uqac.lif.cep.ProcessorException - Specified by:
computein classca.uqac.lif.cep.SynchronousProcessor- Throws:
ca.uqac.lif.cep.ProcessorException
-
duplicate
- Specified by:
duplicatein interfaceca.uqac.lif.cep.Duplicable- Specified by:
duplicatein classca.uqac.lif.cep.Processor
-