View Source vdist_atom_cache_map (erldist_filter v1.28.5)

Summary

Types

-type index() :: 0..255.
-type t() ::
    #vdist_atom_cache_map{long_atoms :: boolean(),
                          cache :: vdist_atom_cache:t(),
                          entries ::
                              #{vdist_atom_cache:index() =>
                                    {vdist_atom_cache_map:index(),
                                     atom(),
                                     vdist:atom_cache_ref_entry()}}}.

Functions

Link to this function

find_or_insert(CacheMap, Atom)

View Source
-spec find_or_insert(CacheMap, Atom) -> {ok, InternalIndex, CacheMap} | {error, Reason}
                  when
                      CacheMap :: t(),
                      Atom :: atom(),
                      InternalIndex :: index(),
                      Reason ::
                          {already_present, {InternalIndex, CacheIndex, OtherAtom}} |
                          {corrupted_atom_cache_ref_entry, {InternalIndex, AtomCacheRefEntry}} |
                          max_internal_atom_cache_entries | max_atom_cache_size,
                      CacheIndex :: vdist_atom_cache:index(),
                      OtherAtom :: atom(),
                      AtomCacheRefEntry :: vdist:atom_cache_ref_entry().
Link to this function

get_atom_cache(CacheMap)

View Source
-spec get_atom_cache(CacheMap) -> Cache when CacheMap :: t(), Cache :: vdist_atom_cache:t().
Link to this function

get_atom_cache_ref_entries(CacheMap)

View Source
-spec get_atom_cache_ref_entries(CacheMap) -> AtomCacheRefEntries
                              when
                                  CacheMap :: t(),
                                  AtomCacheRefEntries :: [vdist:atom_cache_ref_entry()].
Link to this function

get_long_atoms(CacheMap)

View Source
-spec get_long_atoms(CacheMap) -> boolean() when CacheMap :: t().
Link to this function

get_number_of_atom_cache_refs(CacheMap)

View Source
-spec get_number_of_atom_cache_refs(CacheMap) -> non_neg_integer() when CacheMap :: t().
-spec new(Cache) -> CacheMap when Cache :: vdist_atom_cache:t(), CacheMap :: t().