Struct ackr::Ackr [] [src]

pub struct Ackr { /* fields omitted */ }

Track tuple acks across multiple tasks with minimal memory requirements. The algorithm is from the stream-processing system Storm.

The only allocation needed is two 64-bit values per task (task_id, ack value) and scales to 264 tuples.

To track a tuple, you call tuple. The tuple's id will be XORed with the previous ack value. As tuples are acked (marked as arbitrarily completed), the ack value will once again be XORed. Once all tuples are acked/completed, the ack value will be 0.

Methods

impl Ackr
[src]

Create a new Ackr with no buckets/tasks.

Insert a new bucket entry with the Source id as the initial ack value.

Add a tuple to the Source's ack value. This is essentially just the first XOR.

XOR the ack value for a given Source and the result is the new ack value. Acking once adds the tuple to the Source, acking it twice removes it.

Trait Implementations

impl PartialEq for Ackr
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Ackr
[src]

impl Debug for Ackr
[src]

Formats the value using the given formatter.