Apama 10.3 | Apama Documentation | Developing Apama Applications | Developing Apama Applications in EPL | Implementing Parallel Processing | Introduction to contexts | About context properties
About context properties
A context has the following properties:
*Name — A string that you specify when you create the context. This name does not need to be unique. The name is a convenient identifier that you can use in your code.
*ID — The correlator assigns a unique integer.
*receiveInput flag — A Boolean value that indicates whether the context can receive external input events on the default channel, which is the empty string ("").
A value of true lets the context receive external events on the default channel; this is a public context. A value of true is equivalent to a subscription to the default channel; there is no requirement for a monitor instance in this context to subscribe to the default channel.
A value of false indicates a private context that does not receive external events on the default channel. This is the default.
Note that the main context is public.
*Channel subscriptions — 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.
You can spawn to other contexts. When the last monitor instance in a context terminates, that context stops doing work and stops consuming resources until you spawn another monitor instance to it.
In a context, when you route an event, the event goes to the front of that context's input queue. You can route events only within a context.
You can send an event to a particular context. When you do this, the event goes to the end of the specified context's input queue. The correlator processes it after it processes any other events that are already on the context's input queue. See Sending an event to a particular context.
You can use a context as part of the key for a dictionary. You can route an event that contains a context field. You cannot parse a context. Context objects are immutable reference objects.

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.