Node:set-scheduling, Next:, Previous:get-scheduling, Up:Protocol Requests



set-scheduling [119] (11) Experimental


        set-scheduling [119] (( session-no : Session-No;
                                priority   : INT16;
                                weight     : INT16 ))
                -> ( );

This call sets the scheduling priority and weight of the connection. Scheduling-Info, for more information. You can use 0 as session-no to set the info for the current session.

Example:

        1 118 0
        =1 1 1000
        2 119 0 0 1000
        %2 58 1
        3 119 0 1 2500
        %2 59 1500
        3 119 0 1 1500
        =3

This example uses get-scheduling to find out the current scheduling setting (priority 1 and weight 1000). The client then attempts to get a better priority (0), but is informed that priority 1 is the best priority available to this user (or before logging in). At request 3 the client attempts to increase the weight to 2500, but is informed that 1500 is the best weight available. It finally sets the weight to 1500. This will result in a 50% speedup compared to the default setting.

The set-scheduling request makes it possible to implement a quite complex scheduling machinery in the server. Please note, however, that a server that only implements priority 0 and weight 1 (and thus treats all sessions equally) is fully compliant with this specification. The number of priorities and weights that are available is implementation-defined. They can vary depending on the privileges of the user that is logged in, and may be affected by the enable call.

Error codes

The first error code in the list below that is applicable will be returned.


weight-zero
You must specify a non-zero weight.
login-first
Login required before issuing this call, unless session-no is 0 or the number of the current session.
undefined-session
That session does not exist.
access-denied
You don't have enough privileges to modify the priority of the specified session. You can only modify your own session and sessions logged in as a person you are supervisor of.
index-out-of-range
The priority argument is numerically too large. error-status indicates the numerically largest priority that the server supports.
priority-denied
You don't have enough privileges to lower your priority. error-status indicates the lowest priority that you have access to.
weight-denied
You don't have enough privileges to set the specified weight at the specified priority. error-status indicates the highest weight you have access to at the specified priority. The limit may differ at different priorities.