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 :: MonadDES m => StrategyQueue m (TransactQueueStrategy s) a -> Int -> (a -> Bool) -> Event m (Maybe a)
- transactStrategyQueueContainsBy :: MonadDES m => StrategyQueue m (TransactQueueStrategy s) a -> Int -> (a -> Bool) -> Event m (Maybe a)
Documentation
data TransactQueueStrategy s Source #
The transact queue strategy.
MonadDES m => QueueStrategy m (TransactQueueStrategy s) Source # | An implementation of the |
MonadDES m => DequeueStrategy m (TransactQueueStrategy LCFS) Source # | |
MonadDES m => DequeueStrategy m (TransactQueueStrategy FCFS) Source # | |
MonadDES m => DeletingQueueStrategy m (TransactQueueStrategy FCFS) Source # | |
(MonadDES m, DequeueStrategy m (TransactQueueStrategy s)) => PriorityQueueStrategy m (TransactQueueStrategy s) Int Source # | |
data StrategyQueue m (TransactQueueStrategy s) Source # | |
transactStrategyQueueDeleteBy Source #
:: MonadDES m | |
=> StrategyQueue m (TransactQueueStrategy s) a | the queue |
-> Int | the transact priority |
-> (a -> Bool) | the predicate |
-> Event m (Maybe a) |
Try to delete the transact by the specified priority and satisfying to the provided predicate.
transactStrategyQueueContainsBy Source #
:: MonadDES m | |
=> StrategyQueue m (TransactQueueStrategy s) a | the queue |
-> Int | the transact priority |
-> (a -> Bool) | the predicate |
-> Event m (Maybe a) |
Test whether the queue contains a transact with the specified priority satisfying the provided predicate.