Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module implements data structures and function related to the metadata of the concurrent page allocator.
- class Value root => Root root
- data CurrentMetaPage
- data ConcurrentMeta root = ConcurrentMeta {
- concurrentMetaRevision :: TxId
- concurrentMetaDataNumPages :: S TypeData PageId
- concurrentMetaIndexNumPages :: S TypeIndex PageId
- concurrentMetaRoot :: root
- concurrentMetaDataFreeTree :: S TypeData FreeTree
- concurrentMetaIndexFreeTree :: S TypeIndex FreeTree
- concurrentMetaOverflowTree :: OverflowTree
- concurrentMetaDataCachedFreePages :: S TypeData [FreePage]
- concurrentMetaIndexCachedFreePages :: S TypeIndex [FreePage]
- class StoreM FilePath m => ConcurrentMetaStoreM m where
Documentation
class Value root => Root root Source #
User-defined data root stored inside ConcurrentMeta
.
This can be a user-defined collection of Tree
roots.
data CurrentMetaPage Source #
Data type used to point to the most recent version of the meta data.
data ConcurrentMeta root Source #
Meta data of the page allocator.
The root
type parameter should be a user-defined collection of Tree
roots, instantiating the Root
type class.
To store store a single tree, use ConcurrentMeta (Tree k v)
.
Show root => Show (ConcurrentMeta root) Source # | |
Generic (ConcurrentMeta root) Source # | |
Binary root => Binary (ConcurrentMeta root) Source # | |
type Rep (ConcurrentMeta root) Source # | |
class StoreM FilePath m => ConcurrentMetaStoreM m where Source #
A class representing the storage requirements of the page allocator.
A store supporting the page allocator should be an instance of this class.
putConcurrentMeta :: Root root => FilePath -> ConcurrentMeta root -> m () Source #
Write the meta-data structure to a certain page.
readConcurrentMeta :: Root root => FilePath -> Proxy root -> m (Maybe (ConcurrentMeta root)) Source #
Try to read the meta-data structure from a handle, or return Nothing
if the handle doesn't contain a meta page.
(Applicative m, Monad m, MonadIO m, MonadCatch m) => ConcurrentMetaStoreM (MemoryStoreT FilePath m) Source # | |
(Applicative m, Monad m, MonadIO m, MonadCatch m) => ConcurrentMetaStoreM (FileStoreT FilePath m) Source # | |