Beethoven.TestdRole (Beethoven v0.3.9)
Example role that leverages DistrServer instead of GenServer.
Summary
Functions
Returns a specification to start this module under a supervisor.
Similar to :mnesia.dirty_select/2
but only needs the match spec as an argument.
The table name of the DistrServer Elixir.Beethoven.TestdRole
's mnesia table is input automatically as the 1st arity.
Fetches data from the DistrServer Elixir.Beethoven.TestdRole
's mnesia table.
Uses a record key to query the data. Will return all matching records.
Fetches all records from the DistrServer Elixir.Beethoven.TestdRole
's mnesia table.
Returns the name of the DistrServer Elixir.Beethoven.TestdRole
's mnesia table.
Subscribes to the table mapped to the DistrServer Elixir.Beethoven.TestdRole
's mnesia table.
Checks if the DistrServer Elixir.Beethoven.TestdRole
's mnesia table exists.
Holds the thread until the DistrServer Elixir.Beethoven.TestdRole
's mnesia table becomes available, or timeout occurs.
Defaults to 1_000
milliseconds for timeouts and 15
milliseconds for checking intervals.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec dirty_select(:ets.match_spec()) :: [tuple()] | list()
Similar to :mnesia.dirty_select/2
but only needs the match spec as an argument.
The table name of the DistrServer Elixir.Beethoven.TestdRole
's mnesia table is input automatically as the 1st arity.
Fetches data from the DistrServer Elixir.Beethoven.TestdRole
's mnesia table.
Uses a record key to query the data. Will return all matching records.
Fetches all records from the DistrServer Elixir.Beethoven.TestdRole
's mnesia table.
Returns the name of the DistrServer Elixir.Beethoven.TestdRole
's mnesia table.
@spec subscribe(:simple | :detailed) :: :ok
Subscribes to the table mapped to the DistrServer Elixir.Beethoven.TestdRole
's mnesia table.
Matches based on subscription
:simple
{:mnesia_table_event, {:atom, record(), _op_data}}
:detailed
{:mnesia_table_event, {:atom, module() | :atom(), record(), [] | [record()], _op_data}}
@spec table_exists?() :: boolean()
Checks if the DistrServer Elixir.Beethoven.TestdRole
's mnesia table exists.
Holds the thread until the DistrServer Elixir.Beethoven.TestdRole
's mnesia table becomes available, or timeout occurs.
Defaults to 1_000
milliseconds for timeouts and 15
milliseconds for checking intervals.