mealstrom-0.0.1.1: Manipulate FSMs and store them in PostgreSQL.
Copyright(c) Max Amanshauser 2016
LicenseMIT
Maintainermax@lambdalifting.org
Safe HaskellSafe-Inferred
LanguageHaskell2010

Mealstrom.WALStore

Description

A WALStore is anything being able to store WALEntries. WALEntries indicate how often a recovery process has been started for an instance.

Documentation

class WALStore st k where Source #

Methods

walUpsertIncrement :: st -> k -> IO () Source #

walDecrement :: st -> k -> IO () Source #

walScan :: st -> Int -> IO [WALEntry k] Source #

Instances

Instances details
FSMKey k => WALStore PostgresJSONStore k Source # 
Instance details

Defined in Mealstrom.PostgresJSONStore

WALStore (MemoryStore k s e a) k Source # 
Instance details

Defined in Mealstrom.MemoryStore

Methods

walUpsertIncrement :: MemoryStore k s e a -> k -> IO () Source #

walDecrement :: MemoryStore k s e a -> k -> IO () Source #

walScan :: MemoryStore k s e a -> Int -> IO [WALEntry k] Source #

data WALEntry k Source #

Constructors

WALEntry 

Fields

Instances

Instances details
Eq k => Eq (WALEntry k) Source # 
Instance details

Defined in Mealstrom.WALStore

Methods

(==) :: WALEntry k -> WALEntry k -> Bool #

(/=) :: WALEntry k -> WALEntry k -> Bool #

Show k => Show (WALEntry k) Source # 
Instance details

Defined in Mealstrom.WALStore

Methods

showsPrec :: Int -> WALEntry k -> ShowS #

show :: WALEntry k -> String #

showList :: [WALEntry k] -> ShowS #

FSMKey k => Generic (WALEntry k) Source # 
Instance details

Defined in Mealstrom.PostgresJSONStore

Associated Types

type Rep (WALEntry k) :: Type -> Type #

Methods

from :: WALEntry k -> Rep (WALEntry k) x #

to :: Rep (WALEntry k) x -> WALEntry k #

FSMKey k => FromRow (WALEntry k) Source # 
Instance details

Defined in Mealstrom.PostgresJSONStore

Methods

fromRow :: RowParser (WALEntry k) #

type Rep (WALEntry k) Source # 
Instance details

Defined in Mealstrom.PostgresJSONStore

type Rep (WALEntry k) = D1 ('MetaData "WALEntry" "Mealstrom.WALStore" "mealstrom-0.0.1.1-8m4QeTDuQN8CBXSSOFNKH6" 'False) (C1 ('MetaCons "WALEntry" 'PrefixI 'True) (S1 ('MetaSel ('Just "walId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 k) :*: (S1 ('MetaSel ('Just "walTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTCTime) :*: S1 ('MetaSel ('Just "walCount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))))

openTxn :: WALStore st k => st -> k -> IO () Source #

closeTxn :: WALStore st k => st -> k -> IO () Source #