Oracle CEP Event Types

Overview of Creating Oracle CEP Applications 1-7 For more information, see Section 1.1.9.6, User Action: Calling Methods of Stream and Relation Sources and Sinks .

1.1.3.1 Streams and Relations

Oracle CEP models event flow as either streams or relations: ■ A stream S is a bag multi-set of elements s,T where s is in the schema of S and T is in the time domain. Stream elements are tuple-timestamp pairs, which can be represented as a sequence of timestamped tuple insertions. In other words, a stream is a sequence of timestamped tuples. There could be more than one tuple with the same timestamp. The tuples of an input stream are required to arrive at the system in the order of increasing timestamps. You specify a channel as a stream by setting EPN assembly element wlevs: attribute is-relation to false the default. ■ A relation is an unordered, time-varying bag of tuples: in other words, an instantaneous relation. At every instant of time, a relation is a bounded set. It can also be represented as a sequence of timestamped tuples that includes insertions, deletions, and updates to capture the changing state of the relation. You specify a channel as a relation by setting EPN assembly element wlevs:channel attribute is-relation to true. For more information, see: ■ Section 9.1.2, Channels Representing Streams and Relations ■ Streams and Relations in the Oracle Complex Event Processing CQL Language Reference

1.1.3.2 Stream and Relation Sources

All components that produce events must implement one of the following interfaces: ■ com.bea.wlevs.ede.api.StreamSource ■ com.bea.wlevs.ede.api.RelationSource com.bea.wlevs.ede.api.StreamSource The StreamSource interface has one method, setEventSender; at runtime the event source component is injected with a com.bea.wlevs.ede.api.StreamSender instance. The StreamSender instance, in turn, has a sendInsertEvent method that the component invokes to actually send events to the next component in the EPN. The StreamSender instance also provides a sendHeartbeat method. The sendHeartBeat method applies only to application-timestamped channels. If you enable batching on a channel, then components that send events to that channel must implement the com.bea.wlevs.ede.api.BatchStreamSender interface. The BatchStreamSender interface has a sendInsertEvents method that the component invokes to send a batch of events of type insert downstream to a BatchStreamSink. For more information, see Section 9.1.6, Batch Processing Channels .