eventful-memory-0.1.3: In-memory implementations for eventful

Safe HaskellNone
LanguageHaskell2010

Eventful.ProjectionCache.Memory

Synopsis

Documentation

type ProjectionMap key orderKey serialized = Map key (orderKey, serialized) Source #

A ProjectionMap just stores the latest snapshot for each UUID.

emptyProjectionMap :: ProjectionMap key orderKey serialized Source #

projectionMapTVar :: IO (TVar (ProjectionMap key orderKey serialized)) Source #

tvarProjectionCache :: Ord key => TVar (ProjectionMap key orderKey serialized) -> ProjectionCache key orderKey serialized STM Source #

A ProjectionCache that uses a TVar and runs in STM.

embeddedStateProjectionCache :: (MonadState s m, Ord key) => (s -> ProjectionMap key orderKey serialized) -> (s -> ProjectionMap key orderKey serialized -> s) -> ProjectionCache key orderKey serialized m Source #

A ProjectionCache for some MonadState that contains a ProjectionMap.