Copyright © 2009-2012 Marc Worrell Date: 2009-04-17
Behaviours: gen_server.
Authors: Marc Worrell (marc@worrell.nl).
| code_change/3 | Convert process state when code is changed. |
| define_custom_pivot/3 | Let a module define a custom pivot columns() -> [column()] column() -> {ColumName::atom(), ColSpec::string()} | {atom(), string(), options::list()}. |
| get_pivot_data/2 | |
| get_pivot_title/1 | |
| get_pivot_title/2 | Fetch the first title from the record for sorting. |
| handle_call/3 | Trap unknown calls. |
| handle_cast/2 | Poll the queue for the default host. |
| handle_info/2 | Handling all non call/cast messages. |
| init/1 | Initiates the server. |
| insert_queue/2 | Insert a rsc_id in the pivot queue. |
| insert_task/3 | Insert a slow running pivot task. |
| insert_task/4 | Insert a slow running pivot task. |
| insert_task/5 | Insert a slow running pivot task with unique key and arguments. |
| insert_task_after/6 | Insert a slow running pivot task with unique key and arguments that should start after Seconds seconds. |
| lookup_custom_pivot/4 | Lookup a custom pivot; give back the Id based on a column. |
| pg_lang/1 | Translate a language to a language string as used by postgresql. |
| pivot/2 | An immediate pivot request for a resource. |
| pivot_resource/2 | Pivot a resource, collect all texts for indexing and some extra to be indexed fields. |
| pivot_resource_update/4 | Return a modified property list with fields that need immediate pivoting on an update. |
| poll/1 | Poll the pivot queue for the database in the context. |
| queue_all/1 | Rebuild the search index by queueing all resources for pivot. |
| start_link/1 | Starts the server. |
| terminate/2 | This function is called by a gen_server when it is about to terminate. |
code_change(OldVsn, State, Extra) -> {ok, NewState}
Convert process state when code is changed
define_custom_pivot(Module, Columns::columns(), Context) -> ok
Let a module define a custom pivot columns() -> [column()] column() -> {ColumName::atom(), ColSpec::string()} | {atom(), string(), options::list()}
get_pivot_data(Id, Context) -> any()
get_pivot_title(Props) -> any()
get_pivot_title(Id, Context) -> any()
Fetch the first title from the record for sorting.
handle_call(Message::Request, From, State) -> {reply, Reply, State} | {reply, Reply, State, Timeout} | {noreply, State} | {noreply, State, Timeout} | {stop, Reason, Reply, State} | {stop, Reason, State}
Trap unknown calls
handle_cast(Message::Msg, State) -> {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}
Poll the queue for the default host
handle_info(Info, State) -> {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}
Handling all non call/cast messages
init(SiteProps::Args) -> {ok, State} | {ok, State, Timeout} | ignore | {stop, Reason}
Initiates the server.
insert_queue(Id, Context) -> any()
Insert a rsc_id in the pivot queue
insert_task(Module, Function, Context) -> any()
Insert a slow running pivot task. For example syncing category numbers after an category update.
insert_task(Module, Function, UniqueKey, Context) -> any()
Insert a slow running pivot task. Use the UniqueKey to prevent double queued tasks.
insert_task(Module, Function, UniqueKey, Args, Context) -> any()
Insert a slow running pivot task with unique key and arguments.
insert_task_after(Seconds, Module, Function, UniqueKey, Args, Context) -> any()
Insert a slow running pivot task with unique key and arguments that should start after Seconds seconds.
lookup_custom_pivot(Module, Column, Value, Context) -> Id | undefined
Lookup a custom pivot; give back the Id based on a column. Will always return the first Id found.
pg_lang(X1) -> any()
Translate a language to a language string as used by postgresql. This language list is the intersection of the default catalogs of postgres with the languages supported by mod_translation.
pivot(Id, Context) -> void()
An immediate pivot request for a resource
pivot_resource(Id, Context) -> void()
Pivot a resource, collect all texts for indexing and some extra to be indexed fields.
pivot_resource_update(Id, UpdateProps, RawProps, Context) -> any()
Return a modified property list with fields that need immediate pivoting on an update.
poll(Context) -> void()
Poll the pivot queue for the database in the context
queue_all(Context) -> any()
Rebuild the search index by queueing all resources for pivot.
start_link(SiteProps) -> {ok, Pid} | ignore | {error, Error}
Starts the server
terminate(Reason, State) -> void()
This function is called by a gen_server when it is about to terminate. It should be the opposite of Module:init/1 and do any necessary cleaning up. When it returns, the gen_server terminates with Reason. The return value is ignored.
Generated by EDoc, Dec 10 2012, 20:44:35.