Copyright | Copyright (c) 2017 David Sorokin <david.sorokin@gmail.com> |
---|---|
License | BSD3 |
Maintainer | David Sorokin <david.sorokin@gmail.com> |
Stability | experimental |
Safe Haskell | None |
Language | Haskell98 |
Tested with: GHC 8.0.2
This module defines a GPSS transact queue strategy.
- data TransactQueueStrategy s = TransactQueueStrategy s
- transactStrategyQueueDeleteBy :: StrategyQueue (TransactQueueStrategy s) a -> Int -> (a -> Bool) -> Event (Maybe a)
- transactStrategyQueueContainsBy :: StrategyQueue (TransactQueueStrategy s) a -> Int -> (a -> Bool) -> Event (Maybe a)
Documentation
data TransactQueueStrategy s Source #
The transact queue strategy.
QueueStrategy (TransactQueueStrategy s) Source # | An implementation of the |
DequeueStrategy (TransactQueueStrategy FCFS) Source # | |
DequeueStrategy (TransactQueueStrategy LCFS) Source # | |
DeletingQueueStrategy (TransactQueueStrategy FCFS) Source # | |
DequeueStrategy (TransactQueueStrategy s) => PriorityQueueStrategy (TransactQueueStrategy s) Int Source # | |
data StrategyQueue (TransactQueueStrategy s) Source # | |
transactStrategyQueueDeleteBy Source #
:: StrategyQueue (TransactQueueStrategy s) a | the queue |
-> Int | the transact priority |
-> (a -> Bool) | the predicate |
-> Event (Maybe a) |
Try to delete the transact by the specified priority and satisfying to the provided predicate.
transactStrategyQueueContainsBy Source #
:: StrategyQueue (TransactQueueStrategy s) a | the queue |
-> Int | the transact priority |
-> (a -> Bool) | the predicate |
-> Event (Maybe a) |
Test whether the queue contains a transact with the specified priority satisfying the provided predicate.