A process to manage the content for a resource (articles, etc.).
Summary
Functions
Returns a specification to start this module under a supervisor.
Removes all the content related to the resouce.
Counts the units of content under a resource
Checks to see if a depot process for a resource exists.
Finds specific content by a key for the resource.
Gets all content for a resource.
Callback implementation for GenServer.handle_continue/2.
Callback implementation for GenServer.init/1.
Inserts content for a resource via a key
Starts the Depot process with a given name to represent the resource.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec clear(PolyPost.Resource.name()) :: :ok
Removes all the content related to the resouce.
@spec count(PolyPost.Resource.name()) :: non_neg_integer()
Counts the units of content under a resource
@spec exists?(PolyPost.Resource.name()) :: boolean()
Checks to see if a depot process for a resource exists.
@spec find(PolyPost.Resource.name(), PolyPost.Resource.key()) :: PolyPost.Resource.content()
Finds specific content by a key for the resource.
@spec get_all(PolyPost.Resource.name()) :: [ {PolyPost.Resource.key(), PolyPost.Resource.content()} ]
Gets all content for a resource.
Callback implementation for GenServer.handle_continue/2.
Callback implementation for GenServer.init/1.
@spec insert( PolyPost.Resource.name(), PolyPost.Resource.key(), PolyPost.Resource.content() ) :: :ok
Inserts content for a resource via a key
@spec start_link(PolyPost.Resource.name()) :: GenServer.on_start()
Starts the Depot process with a given name to represent the resource.