Module ocs_app

This application behaviour callback module starts and stops the ocs application.

Copyright © 2016 - 2026 SigScale Global Inc.

Behaviours: application.

Description

This application behaviour callback module starts and stops the ocs application.

Data Types

start_type()

start_type() = normal | {takeover, node()} | {failover, node()}

Function Index

start/2Starts the application processes.
install/0Equivalent to install([node() | nodes()]).
install/1Initialize OCS tables.
join/1Join an existing cluster.
start_phase/3Called for each start phase in the application and included applications.
prep_stop/1Called when the application is about to be shut down, before any processes are terminated.
stop/1Called after the application has stopped to clean up.
config_change/3Called after a code replacement, if there are any changes to the configuration parameters.
force/1*Try to force load bad tables.
add_example_offers/0*Seed product catalog with example offers.
create_table/2*Create mnesia table.

Function Details

start/2

start(StartType, StartArgs) -> Result

Starts the application processes.

See also: //kernel/application:start/1, //kernel/application:start/2.

install/0

install() -> Result

Equivalent to install([node() | nodes()]).

install/1

install(Nodes) -> Result

Initialize OCS tables. Nodes is a list of the nodes where ocs tables will be replicated.

If mnesia is not running an attempt will be made to create a schema on all available nodes. If a schema already exists on any node mnesia will be started on all nodes using the existing schema.

join/1

join(Node) -> Result

Join an existing cluster.

Tables will be copied from the given Node.

start_phase/3

start_phase(Phase, StartType, PhaseArgs) -> Result

Called for each start phase in the application and included applications.

See also: //kernel/app.

prep_stop/1

prep_stop(State) -> #state{}

Called when the application is about to be shut down, before any processes are terminated.

See also: //kernel/application:stop/1.

stop/1

stop(State) -> any()

Called after the application has stopped to clean up.

config_change/3

config_change(Changed, New, Removed) -> ok

Called after a code replacement, if there are any changes to the configuration parameters.

force/1 *

force(Tables) -> Result

Try to force load bad tables.

add_example_offers/0 *

add_example_offers() -> Result

Seed product catalog with example offers.

create_table/2 *

create_table(Table, Nodes) -> Result

Create mnesia table.


Generated by EDoc