MemPool (fsm_diagram v0.1.0)

Copy Markdown View Source

:ets wrapper to manage variables with Module name

Summary

Functions

Returns a specification to start this module under a supervisor.

create mem to check if it is new

update data into mem

Functions

child_spec(arg)

Returns a specification to start this module under a supervisor.

arg is passed as the argument to Task.start_link/1 in the :start field of the spec.

For more information, see the Supervisor module, the Supervisor.child_spec/2 function and the Supervisor.child_spec/0 type.

cre_mpf(data)

@spec cre_mpf(tuple()) :: boolean()

create mem to check if it is new

delete(key)

@spec delete(any()) :: any()

get_mpf(key)

@spec get_mpf(any()) :: tuple() | nil

get_mpfelm(key, pos)

@spec get_mpfelm(any(), integer()) :: any()

get_mpfkeys()

@spec get_mpfkeys() :: [any()]

put_mpf(data)

@spec put_mpf(tuple()) :: boolean()

update data into mem

put_mpfelm(key, block)

@spec put_mpfelm(any(), {pos_integer(), any()} | [{pos_integer(), any()}]) ::
  boolean()

start_link(argv)

@spec start_link(any()) :: {:ok, pid()}