amnesia v0.2.8 Amnesia.Fragment.Hash behaviour

This module provides a behavior to implement a different fragment hashing algorithm.

Link to this section Summary

Callbacks

Add a fragment returning the new fragment numbers and state.

Delete a fragment returning the new fragment numbers and state.

Initialize the hash state.

Convert a key to a fragment number.

Convert a match_spec to fragment numbers.

Link to this section Callbacks

Link to this callback

add_frag(any)

add_frag(any()) :: {any(), [integer()], [integer()]}

Add a fragment returning the new fragment numbers and state.

Link to this callback

del_frag(any)

del_frag(any()) :: {any(), [integer()], [integer()]}

Delete a fragment returning the new fragment numbers and state.

Link to this callback

init_state(atom, any)

init_state(atom(), any()) :: any()

Initialize the hash state.

Link to this callback

key_to_frag_number(any, any)

key_to_frag_number(any(), any()) :: integer()

Convert a key to a fragment number.

Link to this callback

match_spec_to_frag_numbers(any, any)

match_spec_to_frag_numbers(any(), any()) :: [integer()]

Convert a match_spec to fragment numbers.