Apama API Reference for .NET  9.10.0.4
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Apama.Services.Scenario.IllegalCallingThreadException Class Reference

Thrown when an attempt is made to change the state of running scenarios in the data queue processing thread. More...

Inherits SystemException.

Public Member Functions

 IllegalCallingThreadException (string operation)
 See class description. More...
 

Detailed Description

Thrown when an attempt is made to change the state of running scenarios in the data queue processing thread.

The Scenario Service guarantees that updates from scenarios are processed in order. The service also guarantees that any operation to change the state of running scenarios does not complete until any previous updates have been processed. It does not provide any guarantees of atomicity of operations.

This means that if an operation to change a scenario's state is attempted while in a PropertyChangeListener, the operation should not complete until after the PropertyChangeListener has completed. As this is not possible, the attempted operation will throw this exception instead.

If a scenario requires a change to an input variable because of an output variable, the scenario should do this by using rules in the scenario itself. Any such changes will then happen atomically - this cannot be done atomically using the Scenario Service (and any such input variables should be marked as output variables as well).

Alternatively, another thread should be used to perform the operation - this allows the PropertyChangeListener to complete before the operation. Note that further PropertyChangeListener calls may occur before the operation is complete.

Note that this will not complete until after the caller has returned, and further calls to PropertyChangeListeners may occur (and need to complete) before the setValues method returns.

Operations that throw this exception:

Constructor & Destructor Documentation

Apama.Services.Scenario.IllegalCallingThreadException.IllegalCallingThreadException ( string  operation)
Submit a bug or feature
Copyright (c) 2013-2016 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. Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.