Class Derivation

  • All Implemented Interfaces:
    ca.uqac.lif.azrael.Printable, ca.uqac.lif.azrael.Readable, 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[] m_processors  
      protected ca.uqac.lif.cep.Pushable[] m_pushables  
      protected long m_slowDown  
      • 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_eventTracker, m_hasBeenNotifiedOfEndOfTrace, m_inputArity, m_inputCount, m_inputPullables, m_inputQueues, m_notifiedEndOfTraceDownstream, m_outputArity, m_outputCount, 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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean compute​(java.lang.Object[] inputs, java.util.Queue<java.lang.Object[]> outputs)  
      Derivation duplicate​(boolean with_state)  
      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.
      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.
      void start()  
      void stop()  
      • Methods inherited from class ca.uqac.lif.cep.SynchronousProcessor

        getPullableOutput, getPushableInput, setEventTracker
      • Methods inherited from class ca.uqac.lif.cep.Processor

        allNotifiedEndOfTrace, allNull, associateTo, associateToInput, associateToOutput, copyInputQueue, copyOutputQueue, duplicate, duplicateInto, equals, getAt, getContext, getContext, getEmptyQueue, getEventTracker, getId, getInputArity, getInputCount, getInputQueue, getInputType, getInputTypesFor, getLeaves, getLeaves, getOutputArity, getOutputCount, getOutputQueue, getOutputType, getPullableInput, getPullableOutput, getPushableInput, getPushableOutput, hashCode, leftShift, newContext, onEndOfTrace, or, or, print, printState, read, 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 Detail

      • 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 Detail

      • 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 Detail

      • 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​(java.lang.Object[] inputs,
                                  java.util.Queue<java.lang.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