Behaviours: gen_server.
Authors: : Ulf Wiger (ulf@wiger.net).
abstract datatype: counter()
ctx_options() = [{_Ctxt::env | opts, _App::user | atom(), [option()]}]
info_category() = queues | group_rates | counters
job_class() = any()
mod_args() = {atom(), list()}
mod_fun() = {atom(), atom()}
option() = {queues, [q_spec()]} | {config, file:name()} | {group_rates, [{q_name(), [option()]}]} | {counters, [{q_name(), [option()]}]} | {interval, integer()}
q_check_interval() = integer() | infinity | mfa()
q_modifier() = {q_modifier_name(), integer()} | {q_modifier_name(), integer(), q_modifier_remote()} | {q_modifier_name(), fun((integer(), q_modifier_remote()) -> integer())} | {q_modifier_name(), mod_fun()}
q_modifier_name() = cpu | memory | any()
q_modifier_remote() = {avg | max, integer()}
q_modifiers() = [q_modifier()]
q_name() = any()
q_opt() = {regulators, [q_reg_opt()]} | {type, q_opt_type()} | {producer, q_producer()} | passive | {passive, fifo} | {action, q_opt_action()} | q_opt_action() | {check_interval, q_check_interval()} | {max_time, integer()} | {max_size, integer()} | {mod, atom()} | {standard_rate, integer()} | {standard_counter, integer()}
q_opt_action() = approve | reject
q_opt_type() = fifo | lifo | {producer, q_producer()} | {action, q_opt_action()}
q_opts() = [q_opt()]
q_producer() = function() | mfa() | mod_args()
q_reg_counter() = {limit, integer()} | {increment, integer()} | {modifiers, q_modifiers()} | {name, any()}
q_reg_opt() = {rate, q_reg_rate()} | {counter, q_reg_counter()} | {named_counter, any(), integer()} | {group_rate, q_reg_rate()}
q_reg_rate() = {limit, integer()} | {modifiers, q_modifiers()} | {name, any()}
q_spec() = {q_name(), q_std_type(), q_opts()} | {q_name(), q_opts()}
q_std_type() = standard_rate | standard_counter
queue_name() = any()
abstract datatype: reg_obj()
regulator() = #rr{} | #cr{} | regulator_ref()
regulator_ref() = #group_rate{} | #counter{}
timestamp() = integer()
add_counter(Name, Options) -> any()
add_group_rate(Name, Options) -> any()
add_queue(Name::queue_name(), Options::q_opts()) -> ok
ask() -> {ok, any()} | {error, rejected | timeout}
ask(Type::job_class()) -> {ok, reg_obj()} | {error, rejected | timeout}
ask_queue(QName::queue_name(), Request::any()) -> any()
Invoke the Q:handle_call/3 function (if it exists).
Send a request to a specific queue in the JOBS server. Each queue has its own local state, allowing it to collect special statistics. This function allows a client to send a request that is handled by a specific queue instance, either to pull information from the queue, or to influence its state.auto_restore(Flag) -> any()
code_change(FromVsn, St, Extra) -> any()
delete_counter(Name) -> any()
delete_group_rate(Name) -> any()
delete_queue(Name::queue_name()) -> ok
dequeue(Type::job_class(), N::integer() | infinity) -> [{timestamp(), any()}]
done(Opaque::reg_obj()) -> ok
enqueue(Type::job_class(), Item::any()) -> ok
handle_call(Req, From, S) -> any()
handle_cast(Msg, St) -> any()
handle_info(Msg, St) -> any()
info(Item::info_category()) -> [any()]
init(Opts::[option()]) -> {ok, #st{queues = [#queue{name = any(), mod = atom(), type = fifo | lifo | #producer{} | #passive{type = fifo} | #action{a = q_opt_action()} | q_opt_type(), group = atom(), regulators = [regulator() | regulator_ref()], max_time = integer() | undefined, max_size = integer() | undefined, latest_dispatch = integer(), approved = any(), queued = any(), check_interval = q_check_interval() | undefined, oldest_job = integer() | undefined, timer = any(), link_ref = undefined | reference(), check_counter = integer(), empty = boolean(), depleted = boolean(), waiters = [{pid(), reference()}], stateful = any(), st = any()}] | [tuple()], group_rates = [#grp{name = any(), rate = any(), latest_dispatch = integer()}], counters = [#cr{}], monitors = any(), q_select = atom(), q_select_st = any(), default_queue = any(), info_f = any()}}
modify_counter(Name, Opts) -> any()
modify_group_rate(Name, Opts) -> any()
modify_queue(Name::queue_name(), Options::q_opts()) -> ok | {error, any()}
modify_regulator(Type, QName, RegName, Opts) -> any()
queue_info(Name) -> any()
queue_info(Name, Item) -> any()
run(Fun::fun(() -> X)) -> X
run(Type::job_class(), Fun::fun(() -> X)) -> X
set_modifiers(Modifiers) -> any()
start_link() -> {ok, pid()}
start_link(Opts0::ctx_options()) -> {ok, pid()}
terminate(X1, X2) -> any()
timestamp() -> any()
timestamp_to_datetime(TS) -> any()
Generated by EDoc