Connection Assignment

A connection is assigned to a worker when that worker removes it from the connection-ready queue to handle an event for that connection.

A temporary transient JadeMultiWorkerTcpConnection object is created and passed as a parameter to the appropriate event callback method.

By default, when the worker has finished handling the event and it exits from the callback method, the temporary connection object is automatically deleted, which causes the client connection to be unassigned and added back to the idle connection list to await the next event.

The worker process can assume responsibility for deleting the temporary object and retain ownership of the connection after exiting from the callback method, by setting the keepAssigned property to true.

A worker can have multiple client connections concurrently assigned to it.

A client connection can be assigned only to a single worker and only that worker can manipulate that connection (for example, read data, write data, or modify property values).

While a connection is assigned to a worker, no further event callback methods are invoked for that connection but events are queued until the connection is unassigned.

If a worker process terminates holding assigned connections, those connections are closed.

If a connection callback is unwound by an unhandled exception, that connection is closed.