Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Marconi.Core.Transformer.WithDelay
Description
A transformer that delay insertion of events into an indexer.
See Marconi.Core for documentation.
Synopsis
- data WithDelay indexer event
- withDelay :: Word -> indexer event -> WithDelay indexer event
- class HasDelayConfig indexer where
- delayCapacity :: Lens' (indexer event) Word
Documentation
data WithDelay indexer event #
When indexing computation is expensive, you may want to delay it to avoid expensive rollback
WithDelay
buffers events before sending them to the underlying indexer.
Buffered events are sent when the buffers overflows.
An indexer wrapped in WithDelay
won't interact nicely with a coordinator at the moment,
as WithDelay
acts as it's processing an event while it only postpones the processing.
As a consequence, WithDelay
is preferably used at the top of the hierarchy.
Instances
A smart constructor for WithDelay
class HasDelayConfig indexer where #
Provide accces to the delay size of a WithDelay
transformer.
The provided instance ensure that access is granted even if other indexer transformers are used
on top of this one
Methods
delayCapacity :: Lens' (indexer event) Word #
Instances
HasDelayConfig (WithDelay indexer) # | |
Defined in Marconi.Core.Transformer.WithDelay Methods delayCapacity :: Lens' (WithDelay indexer event) Word # | |
(IndexerTrans t, HasDelayConfig indexer) => HasDelayConfig (t indexer) # | |
Defined in Marconi.Core.Transformer.WithDelay Methods delayCapacity :: Lens' (t indexer event) Word # | |
(IndexerMapTrans t, HasDelayConfig indexer) => HasDelayConfig (t indexer output) # | |
Defined in Marconi.Core.Transformer.WithDelay Methods delayCapacity :: Lens' (t indexer output event) Word # |