|Description:||Throttles requests to allow a configured number to be passed concurrently|
Throttle is a transparent overlay. You must instantiate an instance of the overlay from its prototype, this will create a new instance within your application space.
The layer1.Concurrency.Throttle prototype has the following initialisation parameters:
|config||Optional||Identifier or XML||(none)|
Configuration for the throttle
A nested space definition which the overlay will delegate all requests in to.
Here is an auto-generated example of how to instantiate an instance of Throttle:
To use Throttle transparent overlay you must import the module urn:org:netkernel:ext:layer1:
Requests pass through the throttle to the wrapped space as long as there are no more than concurrency requests active simultaneously. If a request arrives and there are already concurrency active requests in the wrapped space then the request will be placed in the request queue. When an active request completes then the next waiting request in the queue is allowed to progress to the wrapped space. If a request arrives at the throttle and there are already queue requests in the request queue then the request is reject and will be given a NKFException with "Throttle Overload".
Configuration may be supplied with the config parameter of the form...
An application uses a commercial RDBMS server with strict licensing requirements to not exceed two active requests. To ensure license compliance a throttle overlay is place around the database module.