Class StreamJunction

  • All Implemented Interfaces:
    EventBufferHolder

    public class StreamJunction
    extends Object
    implements EventBufferHolder
    Stream Junction is the place where streams are collected and distributed. There will be an Stream Junction per evey event stream. StreamJunction.Publisher can be used to publish events to the junction and StreamJunction.Receiver can be used to receive events from Stream Junction. Stream Junction will hold the events till they are consumed by registered Receivers.
    • Constructor Detail

      • StreamJunction

        public StreamJunction​(io.siddhi.query.api.definition.StreamDefinition streamDefinition,
                              ExecutorService executorService,
                              int bufferSize,
                              StreamJunction faultStreamJunction,
                              SiddhiAppContext siddhiAppContext)
    • Method Detail

      • sendEvent

        public void sendEvent​(ComplexEvent complexEvent)
      • sendEvent

        public void sendEvent​(Event event)
      • startProcessing

        public void startProcessing()
        Create and start disruptor based on annotations given in the streamDefinition.
      • stopProcessing

        public void stopProcessing()
      • unsubscribe

        public void unsubscribe​(StreamCallback streamCallback)
      • getStreamId

        public String getStreamId()
      • getStreamDefinition

        public io.siddhi.query.api.definition.StreamDefinition getStreamDefinition()
      • handleError

        public void handleError​(long timeStamp,
                                Object[] data,
                                Exception e)