public class StreamJunction extends Object implements EventBufferHolder
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.Modifier and Type | Class and Description |
---|---|
static class |
StreamJunction.OnErrorAction
Different Type of On Error Actions
|
class |
StreamJunction.Publisher
Interface to be implemented to send events into the Stream Junction.
|
static interface |
StreamJunction.Receiver
Interface to be implemented by all receivers who need to subscribe to Stream Junction and receive events.
|
Constructor and Description |
---|
StreamJunction(io.siddhi.query.api.definition.StreamDefinition streamDefinition,
ExecutorService executorService,
int bufferSize,
StreamJunction faultStreamJunction,
SiddhiAppContext siddhiAppContext) |
Modifier and Type | Method and Description |
---|---|
StreamJunction.Publisher |
constructPublisher() |
boolean |
containsBufferedEvents() |
long |
getBufferedEvents() |
io.siddhi.query.api.definition.StreamDefinition |
getStreamDefinition() |
String |
getStreamId() |
void |
handleError(long timeStamp,
Object[] data,
Exception e) |
void |
handleError(Object event,
Exception e) |
void |
sendEvent(ComplexEvent complexEvent) |
void |
sendEvent(Event event) |
void |
startProcessing()
Create and start disruptor based on annotations given in the streamDefinition.
|
void |
stopProcessing() |
void |
subscribe(StreamJunction.Receiver receiver) |
public StreamJunction(io.siddhi.query.api.definition.StreamDefinition streamDefinition, ExecutorService executorService, int bufferSize, StreamJunction faultStreamJunction, SiddhiAppContext siddhiAppContext)
public void sendEvent(ComplexEvent complexEvent)
public void sendEvent(Event event)
public void startProcessing()
public void stopProcessing()
public StreamJunction.Publisher constructPublisher()
public void subscribe(StreamJunction.Receiver receiver)
public String getStreamId()
public io.siddhi.query.api.definition.StreamDefinition getStreamDefinition()
public long getBufferedEvents()
getBufferedEvents
in interface EventBufferHolder
public boolean containsBufferedEvents()
containsBufferedEvents
in interface EventBufferHolder
Copyright © 2019. All rights reserved.