##About
Er is ETS register. Main goal is to have safe ets owner processes, never lose tables when process dies and table registration under any erlang term.
Er has two separate name spaces (processes) for handling public and non-public etses. Public tables accessed as usual, while private and protected should be accepted by a process in a ets:give_avay(Tab, _, {er_priv, Name})
way.
For non-public tables er automatically sets heir
option, so these tables will be returned back to er if current owner dies and no data will be lost.
##API
new(Name, Opts)
- creates table and registers underName
,Opts
is usual ets optionsreplace(Name, Opts)
- replaces existing or non-existing table under nameName
get_or_new(Name, Opts)
- find or create new table with given nameget_public(Name)
- get public table with given nameget_private(Name)
- get non-public (protected or private) table with given namedel_public(Name)
- delete public tabledel_private(Name)
- delete private table
- get_protected when only reading is required?