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.OutputPullable

    Nested classes/interfaces inherited from class ca.uqac.lif.cep.Processor

    ca.uqac.lif.cep.Processor.InternalProcessorState
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected ca.uqac.lif.cep.Processor[]
     
    protected ca.uqac.lif.cep.Pushable[]
     
    protected long
     

    Fields inherited from class ca.uqac.lif.cep.SynchronousProcessor

    m_inputPushables, m_outputPullables, m_tempQueue

    Fields 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

    Constructors
    Constructor
    Description
    Derivation(long slowdown, ca.uqac.lif.cep.Processor... procs)
    Creates a new derivation
    Derivation(ca.uqac.lif.cep.Processor... procs)
    Creates a new derivation
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
    compute(Object[] inputs, Queue<Object[]> outputs)
     
    duplicate(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.
    void
     
    void
     

    Methods inherited from class ca.uqac.lif.cep.SynchronousProcessor

    getPullableOutput, getPushableInput

    Methods 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

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • 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

      public Derivation 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. 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 processor
      p2 - 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 processor
      out_index - The index of the first processor's output to connect to the derivation
      p2 - The second processor
      in_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:
      start in class ca.uqac.lif.cep.Processor
      Throws:
      ca.uqac.lif.cep.ProcessorException
    • stop

      public void stop() throws ca.uqac.lif.cep.ProcessorException
      Overrides:
      stop in class ca.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:
      compute in class ca.uqac.lif.cep.SynchronousProcessor
      Throws:
      ca.uqac.lif.cep.ProcessorException
    • duplicate

      public Derivation duplicate(boolean with_state)
      Specified by:
      duplicate in interface ca.uqac.lif.cep.Duplicable
      Specified by:
      duplicate in class ca.uqac.lif.cep.Processor