ContentsIndex
Barracuda.PendingRoute
MaintainerStephan Friedrichs, Henning Guenther
Description
A data structure storing the routes that some messages have failed to take, so they are not tried again.
Synopsis
data PendingRoute sign
empty :: PendingRoute sign
insert :: UTCTime -> Routed TargetContent sign -> PendingRoute sign -> PendingRoute sign
reinsert :: UTCTime -> Routed TargetContent sign -> Set SockAddr -> PendingRoute sign -> PendingRoute sign
routeAndDelete :: RoutingStrategy (r, Set SockAddr) => r -> PendingRoute sign -> (PendingRoute sign, [(SockAddr, Routed TargetContent sign, Set SockAddr, UTCTime)])
purgeZeroTTL :: UTCTime -> PendingRoute sign -> (PendingRoute sign, [Routed TargetContent sign])
Documentation
data PendingRoute sign
show/hide Instances
??? sign => Eq (PendingRoute sign)
??? sign => Ord (PendingRoute sign)
??? sign => Show (PendingRoute sign)
TimedCollection (PendingRoute sign)
empty :: PendingRoute sign
Creates an empty PendingRoute.
insert
:: UTCTimeThe current point of time.
-> Routed TargetContent signThe message to be saved.
-> PendingRoute sign
-> PendingRoute sign
Inserts a new Routed element into the PendingRoute. If there already are hosts that have to be ignored furtheron, use reinsert.
reinsert
:: UTCTimeThe current point of time.
-> Routed TargetContent signThe message to be saved.
-> Set SockAddrA set of routers that were not able to route the message.
-> PendingRoute sign
-> PendingRoute sign
Inserts a new Routed element into the PendingRoute. It also saves routes that already have been (unsuccessfully) tried before. Compare to insert.
routeAndDelete
:: RoutingStrategy (r, Set SockAddr)
=> rThe RoutingTable with the routing information.
-> PendingRoute signThe PendingRoute storing nacked messages.
-> (PendingRoute sign, [(SockAddr, Routed TargetContent sign, Set SockAddr, UTCTime)])Tuples of messages where a new route has been found. It contains the message itself, a set of attempted routes (including the new one) and a new router to be tried. The new PendingRoute does not contain the newly routed elements.
Tries to reroute stored messages. The function looks at every stored message and proposes a new route. This new route is added to the set of already attempted hosts. All messages with a new route-proposal are removed from the original PendingRoute, so only the "hopeless cases" remain within.
purgeZeroTTL :: UTCTime -> PendingRoute sign -> (PendingRoute sign, [Routed TargetContent sign])
Produced by Haddock version 0.8