Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module implements data structures and function related to the metadata of the concurrent page allocator.
Synopsis
- 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
- putConcurrentMeta :: Root root => FilePath -> ConcurrentMeta root -> m ()
- readConcurrentMeta :: Root root => FilePath -> Proxy root -> m (Maybe (ConcurrentMeta root))
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)
.
Instances
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.
Instances
(Applicative m, Monad m, MonadIO m, MonadCatch m) => ConcurrentMetaStoreM (MemoryStoreT FilePath m) Source # | |
Defined in Database.Haskey.Store.InMemory putConcurrentMeta :: Root root => FilePath -> ConcurrentMeta root -> MemoryStoreT FilePath m () Source # readConcurrentMeta :: Root root => FilePath -> Proxy root -> MemoryStoreT FilePath m (Maybe (ConcurrentMeta root)) Source # | |
(Applicative m, Monad m, MonadIO m, MonadCatch m) => ConcurrentMetaStoreM (FileStoreT FilePath m) Source # | |
Defined in Database.Haskey.Store.File putConcurrentMeta :: Root root => FilePath -> ConcurrentMeta root -> FileStoreT FilePath m () Source # readConcurrentMeta :: Root root => FilePath -> Proxy root -> FileStoreT FilePath m (Maybe (ConcurrentMeta root)) Source # |