| Copyright | PublicDomain |
|---|---|
| Maintainer | lemmih@gmail.com |
| Portability | non-portable (uses GHC extensions) |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Acid.Local
Description
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
Arguments
| :: (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.
Arguments
| :: 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.
Arguments
| :: (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.
Arguments
| :: 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.