context
Values of the context type are references to contexts. A context lets EPL applications organize work into threads that the correlator can concurrently execute.
Usage
A context is subscribed to the union of the channels each of the monitor instances in that context is subscribed to. This is a property of the monitor instances running in a context and is not accessible by means of the context reference object.
Use one of the following constructors to create a context reference:
context(string name)
context(string name, boolean receivesInput)
The optional receivesInput Boolean flag controls whether the context is public or private:
true — A public context can receive external events on the default channel, which is the empty string (
""). There is no requirement for a monitor instance in this context to subscribe to the default channel.
false — A private context does not receive external events on the default channel. This is the default.
Methods
The following methods may be called on variables of context type:
current() —
Returns a context object that is a reference to the current context. The current context is the context that contains the monitor instance or event instance that is calling this method.
getId() —
Returns an integer that is the ID of the context. getName() —
Returns a string that is the name of the context. iqSize() —
Returns an integer that is the current number of elements in the input queue for this context. isPublic() —
Returns a Boolean that indicates whether the context is public. If the context was created as a public context, then the return value is true. toString() —
Returns a string that contains the properties of the context. For example, for a public context whose name is
test, the content of the returned string would be something like this:
context(1, "test", true)