Copyright | PublicDomain |
---|---|
Maintainer | lemmih@gmail.com |
Portability | non-portable (uses GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
AcidState container using a transaction log on disk. The term 'Event' is loosely used for transactions with ACID guarantees. 'Method' is loosely used for state operations without ACID guarantees (see Data.Acid.Core).
- openLocalState :: (Typeable st, IsAcidic st) => st -> IO (AcidState st)
- openLocalStateFrom :: IsAcidic st => FilePath -> st -> IO (AcidState st)
- prepareLocalState :: (Typeable st, IsAcidic st) => st -> IO (IO (AcidState st))
- prepareLocalStateFrom :: IsAcidic st => FilePath -> st -> IO (IO (AcidState st))
- createCheckpointAndClose :: (SafeCopy st, Typeable st) => AcidState st -> IO ()
Documentation
:: (Typeable st, IsAcidic st) | |
=> st | Initial state value. This value is only used if no checkpoint is found. |
-> IO (AcidState st) |
Create an AcidState given an initial value.
This will create or resume a log found in the "state/[typeOf state]/" directory.
:: IsAcidic st | |
=> FilePath | Location of the checkpoint and transaction files. |
-> st | Initial state value. This value is only used if no checkpoint is found. |
-> IO (AcidState st) |
Create an AcidState given a log directory and an initial value.
This will create or resume a log found in directory
.
Running two AcidState's from the same directory is an error
but will not result in dataloss.
:: (Typeable st, IsAcidic st) | |
=> st | Initial state value. This value is only used if no checkpoint is found. |
-> IO (IO (AcidState st)) |
Create an AcidState given an initial value.
This will create or resume a log found in the "state/[typeOf state]/" directory. The most recent checkpoint will be loaded immediately but the AcidState will not be opened until the returned function is executed.
:: IsAcidic st | |
=> FilePath | Location of the checkpoint and transaction files. |
-> st | Initial state value. This value is only used if no checkpoint is found. |
-> IO (IO (AcidState st)) |
Create an AcidState given an initial value.
This will create or resume a log found in directory
.
The most recent checkpoint will be loaded immediately but the AcidState will not be opened
until the returned function is executed.