acid-state-0.14.0: Add ACID guarantees to any serializable Haskell data structure.

Safe Haskell | None
Language | Haskell2010

Data.Acid.Log

# Documentation

data FileLog object Source

Constructors

FileLog |

Fields

logIdentifier :: LogKey object
logCurrent :: MVar FHandle
logNextEntryId :: TVar EntryId
logQueue :: TVar ([ByteString], [IO ()])
logThreads :: [ThreadId]

data LogKey object Source

Constructors

LogKey |

Fields

logDirectory :: FilePath
logPrefix :: String

type EntryId = Int Source

openFileLog :: LogKey object -> IO (FileLog object) Source

closeFileLog :: FileLog object -> IO () Source

pushEntry :: SafeCopy object => FileLog object -> object -> IO () -> IO () Source

pushAction :: FileLog object -> IO () -> IO () Source

ensureLeastEntryId :: FileLog object -> EntryId -> IO () Source

readEntriesFrom :: SafeCopy object => FileLog object -> EntryId -> IO [object] Source

rollbackTo :: SafeCopy object => LogKey object -> EntryId -> IO () Source

rollbackWhile :: SafeCopy object => LogKey object -> (object -> Bool) -> IO () Source

newestEntry :: SafeCopy object => LogKey object -> IO (Maybe object) Source

askCurrentEntryId :: FileLog object -> IO EntryId Source

cutFileLog :: FileLog object -> IO EntryId Source

archiveFileLog :: FileLog object -> EntryId -> IO () Source