This module implements a persistent, transactional collection with Queue interface as well as indexed access by key
This module uses `Data.Binary`

for serialization.

Here `QueueConstraints w r a`

means `Data.Binary.Binary a`

For optimal (de)serialization if you store in the queue different versions of largue structures , for example, documents you better use Data.RefSerialize and Data.Persistent.Queue.Text Instead.

- type RefQueue a = DBRef (Queue a)
- getQRef :: (Typeable a, QueueConstraints w r a) => String -> RefQueue a
- pop :: (Typeable a, QueueConstraints w r a) => RefQueue a -> IO a
- popSTM :: (Typeable a, QueueConstraints w r a) => RefQueue a -> STM a
- pick :: (Typeable a, QueueConstraints w r a) => RefQueue a -> IO a
- flush :: (Typeable a, QueueConstraints w r a) => RefQueue a -> IO ()
- flushSTM :: (Typeable a, QueueConstraints w r a) => RefQueue a -> STM ()
- pickAll :: (Typeable a, QueueConstraints w r a) => RefQueue a -> IO [a]
- pickAllSTM :: (Typeable a, QueueConstraints w r a) => RefQueue a -> STM [a]
- push :: (Typeable a, QueueConstraints w r a) => RefQueue a -> a -> IO ()
- pushSTM :: (Typeable a, QueueConstraints w r a) => RefQueue a -> a -> STM ()
- pickElem :: (Indexable a, Typeable a, QueueConstraints w r a) => RefQueue a -> String -> IO (Maybe a)
- pickElemSTM :: (Indexable a, Typeable a, QueueConstraints w r a) => RefQueue a -> String -> STM (Maybe a)
- readAll :: (Typeable a, QueueConstraints w r a) => RefQueue a -> IO [a]
- readAllSTM :: (Typeable a, QueueConstraints w r a) => RefQueue a -> STM [a]
- deleteElem :: (Indexable a, Typeable a, QueueConstraints w r a) => RefQueue a -> a -> IO ()
- deleteElemSTM :: (Typeable a, Indexable a, QueueConstraints w r a) => RefQueue a -> a -> STM ()
- unreadSTM :: (Typeable a, QueueConstraints w r a) => RefQueue a -> a -> STM ()
- isEmpty :: (Typeable a, QueueConstraints w r a) => RefQueue a -> IO Bool
- isEmptySTM :: (Typeable a, QueueConstraints w r a) => RefQueue a -> STM Bool

# Documentation

getQRef :: (Typeable a, QueueConstraints w r a) => String -> RefQueue aSource

get the reference to new or existing queue trough its name

read the first element in the queue and delete it (pop)

flush :: (Typeable a, QueueConstraints w r a) => RefQueue a -> IO ()Source

empty the queue (factually, it is deleted)

flushSTM :: (Typeable a, QueueConstraints w r a) => RefQueue a -> STM ()Source

version in the STM monad

pickAll :: (Typeable a, QueueConstraints w r a) => RefQueue a -> IO [a]Source

return the list of all elements in the queue. The queue remains unchanged

pickAllSTM :: (Typeable a, QueueConstraints w r a) => RefQueue a -> STM [a]Source

version in the STM monad

push :: (Typeable a, QueueConstraints w r a) => RefQueue a -> a -> IO ()Source

push an element in the queue

pushSTM :: (Typeable a, QueueConstraints w r a) => RefQueue a -> a -> STM ()Source

version in the STM monad

pickElem :: (Indexable a, Typeable a, QueueConstraints w r a) => RefQueue a -> String -> IO (Maybe a)Source

return the first element in the queue that has the given key

pickElemSTM :: (Indexable a, Typeable a, QueueConstraints w r a) => RefQueue a -> String -> STM (Maybe a)Source

version in the STM monad

readAll :: (Typeable a, QueueConstraints w r a) => RefQueue a -> IO [a]Source

return the list of all elements in the queue and empty it

readAllSTM :: (Typeable a, QueueConstraints w r a) => RefQueue a -> STM [a]Source

a version in the STM monad

deleteElem :: (Indexable a, Typeable a, QueueConstraints w r a) => RefQueue a -> a -> IO ()Source

delete all the elements of the queue that has the key of the parameter passed

deleteElemSTM :: (Typeable a, Indexable a, QueueConstraints w r a) => RefQueue a -> a -> STM ()Source

verison in the STM monad