Module backoff

Data Types

backoff()

abstract datatype: backoff()

Function Index

fail/1Mark an attempt as failed, which increments the backoff value for the next round.
fire/1Starts a timer from the backoff() argument, using erlang:start_timer/3.
get/1Reads the current backoff value.
increment/1Increment an integer exponentially.
increment/2Increment an integer exponentially within a range.
init/2init function to be used when the user doesn't feel like using a timer provided by this library.
init/4init function when the user feels like using a timer provided by this library.
rand_increment/1Increment an integer exponentially with randomness or jitter Chooses a delay uniformly from [0.5 * Time, 1.5 * Time] as recommended in: Sally Floyd and Van Jacobson, The Synchronization of Periodic Routing Messages, April 1994 IEEE/ACM Transactions on Networking.
rand_increment/2Increment an integer with exponentially randomness or jitter within a range Chooses a delay uniformly from [0.5 * Time, 1.5 * Time] as recommended in: Sally Floyd and Van Jacobson, The Synchronization of Periodic Routing Messages, April 1994 IEEE/ACM Transactions on Networking.
succeed/1Mark an attempt as successful, which resets the backoff value for the next round.
type/2Swaps between the states of the backoff, going between either normal or jitter modes.

Function Details

fail/1

fail(B::backoff()) -> {New::pos_integer(), backoff()}

Mark an attempt as failed, which increments the backoff value for the next round.

fire/1

fire(Backoff::backoff()) -> Timer::reference()

Starts a timer from the backoff() argument, using erlang:start_timer/3. No reference tracking is done, and this is left to the user. This function is purely a convenience function.

get/1

get(Backoff::backoff()) -> pos_integer()

Reads the current backoff value

increment/1

increment(N::pos_integer()) -> pos_integer()

Increment an integer exponentially

increment/2

increment(N, Max) -> pos_integer()

Increment an integer exponentially within a range

init/2

init(Start, Max) -> backoff()

init function to be used when the user doesn't feel like using a timer provided by this library

init/4

init(Start, Max, Dest, Value) -> backoff()

init function when the user feels like using a timer provided by this library

rand_increment/1

rand_increment(N::pos_integer()) -> pos_integer()

Increment an integer exponentially with randomness or jitter Chooses a delay uniformly from [0.5 * Time, 1.5 * Time] as recommended in: Sally Floyd and Van Jacobson, The Synchronization of Periodic Routing Messages, April 1994 IEEE/ACM Transactions on Networking. http://ee.lbl.gov/papers/sync_94.pdf

rand_increment/2

rand_increment(N, Max) -> pos_integer()

Increment an integer with exponentially randomness or jitter within a range Chooses a delay uniformly from [0.5 * Time, 1.5 * Time] as recommended in: Sally Floyd and Van Jacobson, The Synchronization of Periodic Routing Messages, April 1994 IEEE/ACM Transactions on Networking. http://ee.lbl.gov/papers/sync_94.pdf

succeed/1

succeed(B::backoff()) -> {New::pos_integer(), backoff()}

Mark an attempt as successful, which resets the backoff value for the next round.

type/2

type(Backoff::backoff(), X2::normal | jitter) -> backoff()

Swaps between the states of the backoff, going between either normal or jitter modes.


Generated by EDoc