Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.Storage.LedgerDB.DiskPolicy
Synopsis
- data DiskPolicy = DiskPolicy {}
- data SnapshotInterval
- data TimeSinceLast time
- = NoSnapshotTakenYet
- | TimeSinceLast time
- defaultDiskPolicy ∷ SecurityParam → SnapshotInterval → DiskPolicy
Documentation
data DiskPolicy Source #
On-disk policy
We only write ledger states that are older than k
blocks to disk (that is,
snapshots that are guaranteed valid). The on-disk policy determines how often
we write to disk and how many checkpoints we keep.
Constructors
DiskPolicy | |
Fields
|
Instances
NoThunks DiskPolicy Source # | |
Defined in Ouroboros.Consensus.Storage.LedgerDB.DiskPolicy Methods noThunks ∷ Context → DiskPolicy → IO (Maybe ThunkInfo) # wNoThunks ∷ Context → DiskPolicy → IO (Maybe ThunkInfo) # showTypeOf ∷ Proxy DiskPolicy → String # |
data SnapshotInterval Source #
Length of time, requested by the user, that has to pass after which a snapshot is taken. It can be:
- either explicitly provided by user in seconds
- or default value can be requested - the specific DiskPolicy determines
what that is exactly, see
defaultDiskPolicy
as an example
Constructors
DefaultSnapshotInterval | |
RequestedSnapshotInterval DiffTime |
Instances
Eq SnapshotInterval Source # | |
Defined in Ouroboros.Consensus.Storage.LedgerDB.DiskPolicy Methods | |
Show SnapshotInterval Source # | |
Generic SnapshotInterval Source # | |
Defined in Ouroboros.Consensus.Storage.LedgerDB.DiskPolicy Methods from ∷ SnapshotInterval → Rep SnapshotInterval x Source # to ∷ Rep SnapshotInterval x → SnapshotInterval Source # | |
type Rep SnapshotInterval Source # | |
Defined in Ouroboros.Consensus.Storage.LedgerDB.DiskPolicy type Rep SnapshotInterval = D1 ('MetaData "SnapshotInterval" "Ouroboros.Consensus.Storage.LedgerDB.DiskPolicy" "ouroboros-consensus-0.3.1.0-inplace" 'False) (C1 ('MetaCons "DefaultSnapshotInterval" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "RequestedSnapshotInterval" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DiffTime))) |
data TimeSinceLast time Source #
Constructors
NoSnapshotTakenYet | |
TimeSinceLast time |
Instances
Functor TimeSinceLast Source # | |
Defined in Ouroboros.Consensus.Storage.LedgerDB.DiskPolicy Methods fmap ∷ (a → b) → TimeSinceLast a → TimeSinceLast b Source # (<$) ∷ a → TimeSinceLast b → TimeSinceLast a Source # | |
Show time ⇒ Show (TimeSinceLast time) Source # | |
defaultDiskPolicy ∷ SecurityParam → SnapshotInterval → DiskPolicy Source #
Default on-disk policy suitable to use with cardano-node