class

Honeypot::CircularArray(T)

Inherits Honeypot < Reference < Object

A cache that contains recently reported IPv4 addresses implemented as a circular array.

Constructors

new(size : Int32 = CIRCULAR_ARRAY_SIZE)

Creates a new CircularArray with size CIRCULAR_ARRAY_SIZE

Source

Instance methods

add(val : T)

Add an element to the table.

NOTE: Cost: O(1)

Source
find(val : T) : T | Nil

Find an element in table.

NOTE: Cost: O(@size)

Source