Class Hibernate

java.lang.Object
ca.uqac.lif.cep.Processor
ca.uqac.lif.cep.SynchronousProcessor
ca.uqac.lif.cep.hibernate.Hibernate
All Implemented Interfaces:
ca.uqac.lif.cep.Contextualizable, ca.uqac.lif.cep.Duplicable, ca.uqac.lif.cep.DuplicableProcessor
Direct Known Subclasses:
FileHibernate

public class Hibernate extends ca.uqac.lif.cep.SynchronousProcessor
Stores an internal processor using an object fridge.
Author:
Sylvain Hallé
  • 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.azrael.fridge.Fridge
    A fridge used to store the processor
    protected List<Queue<Object>>
    Each of the queues contained in the sink (one for each output pipe)
    protected ca.uqac.lif.cep.tmf.QueueSink
    A sink to receive the events produced by the processor

    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
    Hibernate(ca.uqac.lif.cep.Processor p, ca.uqac.lif.azrael.fridge.Fridge f)
    Creates a new hibernate processor
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
    compute(Object[] inputs, Queue<Object[]> outputs)
     
    ca.uqac.lif.cep.Processor
    duplicate(boolean with_state)
     
    protected ca.uqac.lif.azrael.fridge.Fridge
    Gets an instance of fridge
    void
    setContext(ca.uqac.lif.cep.Context c)
     
    void
    setContext(String key, Object value)
     

    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, setPullableInput, setPushableOutput, start, startAll, stop, stopAll

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • m_fridge

      protected ca.uqac.lif.azrael.fridge.Fridge m_fridge
      A fridge used to store the processor
    • m_sink

      protected ca.uqac.lif.cep.tmf.QueueSink m_sink
      A sink to receive the events produced by the processor
    • m_queues

      protected List<Queue<Object>> m_queues
      Each of the queues contained in the sink (one for each output pipe)
  • Constructor Details

    • Hibernate

      public Hibernate(ca.uqac.lif.cep.Processor p, ca.uqac.lif.azrael.fridge.Fridge f)
      Creates a new hibernate processor
      Parameters:
      p - The processor to hibernate
      f - The fridge used to store the processor. The fridge must already store the processor.
  • Method Details

    • compute

      protected boolean compute(Object[] inputs, Queue<Object[]> outputs)
      Specified by:
      compute in class ca.uqac.lif.cep.SynchronousProcessor
    • duplicate

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

      protected ca.uqac.lif.azrael.fridge.Fridge getFridge()
      Gets an instance of fridge
      Returns:
      The fridge
    • setContext

      public void setContext(ca.uqac.lif.cep.Context c)
      Specified by:
      setContext in interface ca.uqac.lif.cep.Contextualizable
      Overrides:
      setContext in class ca.uqac.lif.cep.Processor
    • setContext

      public void setContext(String key, Object value)
      Specified by:
      setContext in interface ca.uqac.lif.cep.Contextualizable
      Overrides:
      setContext in class ca.uqac.lif.cep.Processor