sbetter_server (sbroker v1.1.2)

Server for storing the ask and ask_r values for load balanacing processes with sbetter.

Summary

Functions

Register the local process Pid with the server and sets the ask and ask_r values (such as sojourn times) as integer values AskValue and AskRValue.

Unregister the process Pid with the server.

Update the ask and ask_r with values (such as sojourn times) as integer values AskValue and AskRValue for Pid.

Functions

Link to this function

register(Pid, AskValue, AskRValue)

-spec register(Pid, AskValue, AskRValue) -> Result
            when Pid :: pid(), AskValue :: integer(), AskRValue :: integer(), Result :: boolean().

Register the local process Pid with the server and sets the ask and ask_r values (such as sojourn times) as integer values AskValue and AskRValue.

Returns true if the process is successfully registered, or false if already registered.
Link to this function

unregister(Pid)

-spec unregister(Pid) -> true when Pid :: pid().

Unregister the process Pid with the server.

The server will synchronously unlink from Pid.
Link to this function

update(Pid, AskValue, AskRValue)

-spec update(Pid, AskValue, AskRValue) -> Result
          when Pid :: pid(), AskValue :: integer(), AskRValue :: integer(), Result :: boolean().

Update the ask and ask_r with values (such as sojourn times) as integer values AskValue and AskRValue for Pid.

Returns true if the values were updated, or false if Pid is not registered with the server.