# Module jobs_server # * [Data Types](#types) * [Function Index](#index) * [Function Details](#functions) __Behaviours:__ [`gen_server`](gen_server.md). __Authors:__ : Ulf Wiger ([`ulf.wiger@erlang-solutions.com`](mailto:ulf.wiger@erlang-solutions.com)). ## Data Types ## ### info_category() ###

info_category() = queues | group_rates | counters
### queue_name() ###

queue_name() = any()
## Function Index ##
add_counter/2
add_group_rate/2
add_queue/2
ask/0
ask/1
ask_queue/2Invoke the Q:handle_call/3 function (if it exists).
code_change/3
delete_counter/1
delete_group_rate/1
delete_queue/1
dequeue/2
done/1
enqueue/2
handle_call/3
handle_cast/2
handle_info/2
info/1
init/1
modify_counter/2
modify_group_rate/2
modify_regulator/4
queue_info/1
queue_info/2
run/1
run/2
set_modifiers/1
start_link/0
start_link/1
terminate/2
timestamp/0
timestamp_to_datetime/1
## Function Details ## ### add_counter/2 ### `add_counter(Name, Options) -> any()` ### add_group_rate/2 ### `add_group_rate(Name, Options) -> any()` ### add_queue/2 ###

add_queue(Name::queue_name(), Options::[option()]) -> ok


### ask/0 ###

ask() -> {ok, any()} | {error, rejected | timeout}


### ask/1 ###

ask(Type::job_class()) -> {ok, reg_obj()} | {error, rejected | timeout}


### ask_queue/2 ###

ask_queue(QName, Request) -> Reply


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. ### code_change/3 ### `code_change(FromVsn, St, Extra) -> any()` ### delete_counter/1 ### `delete_counter(Name) -> any()` ### delete_group_rate/1 ### `delete_group_rate(Name) -> any()` ### delete_queue/1 ###

delete_queue(Name::queue_name()) -> ok


### dequeue/2 ###

dequeue(Type::job_class(), N::integer() | infinity) -> [{timestamp(), any()}]


### done/1 ###

done(Opaque::reg_obj()) -> ok


### enqueue/2 ###

enqueue(Type::job_class(), Item::any()) -> ok


### handle_call/3 ### `handle_call(Req, From, S) -> any()` ### handle_cast/2 ### `handle_cast(Msg, St) -> any()` ### handle_info/2 ### `handle_info(Msg, St) -> any()` ### info/1 ###

info(Item::info_category()) -> [any()]


### init/1 ###

init(Opts::[option()]) -> {ok, #st{}}


### modify_counter/2 ### `modify_counter(Name, Opts) -> any()` ### modify_group_rate/2 ### `modify_group_rate(Name, Opts) -> any()` ### modify_regulator/4 ### `modify_regulator(Type, QName, RegName, Opts) -> any()` ### queue_info/1 ### `queue_info(Name) -> any()` ### queue_info/2 ### `queue_info(Name, Item) -> any()` ### run/1 ###

run(Fun::fun(() -> X)) -> X


### run/2 ###

run(Type::job_class(), Fun::fun(() -> X)) -> X


### set_modifiers/1 ### `set_modifiers(Modifiers) -> any()` ### start_link/0 ###

start_link() -> {ok, pid()}


### start_link/1 ###

start_link(Opts0::[option()]) -> {ok, pid()}


### terminate/2 ### `terminate(X1, X2) -> any()` ### timestamp/0 ### `timestamp() -> any()` ### timestamp_to_datetime/1 ### `timestamp_to_datetime(TS) -> any()`