haskey-0.3.0.2: A transactional, ACID compliant, embeddable key-value store.

Safe HaskellNone
LanguageHaskell2010

Database.Haskey.Alloc.Concurrent.Internal.Meta

Description

This module implements data structures and function related to the metadata of the concurrent page allocator.

Synopsis

Documentation

class Value root => Root root #

User-defined data root stored inside ConcurrentMeta.

This can be a user-defined collection of Tree roots.

Instances
(Key k, Value v) => Root (Tree k v) # 
Instance details

Defined in Database.Haskey.Alloc.Concurrent.Internal.Meta

data CurrentMetaPage #

Data type used to point to the most recent version of the meta data.

Constructors

Meta1 
Meta2 

data ConcurrentMeta root #

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
Show root => Show (ConcurrentMeta root) # 
Instance details

Defined in Database.Haskey.Alloc.Concurrent.Internal.Meta

Generic (ConcurrentMeta root) # 
Instance details

Defined in Database.Haskey.Alloc.Concurrent.Internal.Meta

Associated Types

type Rep (ConcurrentMeta root) :: * -> * #

Methods

from :: ConcurrentMeta root -> Rep (ConcurrentMeta root) x #

to :: Rep (ConcurrentMeta root) x -> ConcurrentMeta root #

Binary root => Binary (ConcurrentMeta root) # 
Instance details

Defined in Database.Haskey.Alloc.Concurrent.Internal.Meta

Methods

put :: ConcurrentMeta root -> Put #

get :: Get (ConcurrentMeta root) #

putList :: [ConcurrentMeta root] -> Put #

type Rep (ConcurrentMeta root) # 
Instance details

Defined in Database.Haskey.Alloc.Concurrent.Internal.Meta

type Rep (ConcurrentMeta root) = D1 (MetaData "ConcurrentMeta" "Database.Haskey.Alloc.Concurrent.Internal.Meta" "haskey-0.3.0.2-6exa3GFZZej4O9j1bC9Osm" False) (C1 (MetaCons "ConcurrentMeta" PrefixI True) (((S1 (MetaSel (Just "concurrentMetaRevision") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 TxId) :*: S1 (MetaSel (Just "concurrentMetaDataNumPages") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (S TypeData PageId))) :*: (S1 (MetaSel (Just "concurrentMetaIndexNumPages") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (S TypeIndex PageId)) :*: S1 (MetaSel (Just "concurrentMetaRoot") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 root))) :*: ((S1 (MetaSel (Just "concurrentMetaDataFreeTree") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (S TypeData FreeTree)) :*: S1 (MetaSel (Just "concurrentMetaIndexFreeTree") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (S TypeIndex FreeTree))) :*: (S1 (MetaSel (Just "concurrentMetaOverflowTree") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 OverflowTree) :*: (S1 (MetaSel (Just "concurrentMetaDataCachedFreePages") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (S TypeData [FreePage])) :*: S1 (MetaSel (Just "concurrentMetaIndexCachedFreePages") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (S TypeIndex [FreePage])))))))

class StoreM FilePath m => ConcurrentMetaStoreM m where #

A class representing the storage requirements of the page allocator.

A store supporting the page allocator should be an instance of this class.

Minimal complete definition

putConcurrentMeta, readConcurrentMeta

Methods

putConcurrentMeta :: Root root => FilePath -> ConcurrentMeta root -> m () #

Write the meta-data structure to a certain page.

readConcurrentMeta :: Root root => FilePath -> Proxy root -> m (Maybe (ConcurrentMeta root)) #

Try to read the meta-data structure from a handle, or return Nothing if the handle doesn't contain a meta page.