← All compilation units

Flyology.Supervision_Windows

Description

Internal bounded history of admitted restart times. Storage is reserved from the configured Burst_Attempts policy before admission opens. @exclude

Has_Capacity

function Has_Capacity
  (Item : History; Now : Ada.Real_Time.Time; Window : Ada.Real_Time.Time_Span; Limit : Positive)
   return Boolean

@exclude

Parameters
Item

History of admitted attempts

Now

Time of proposed attempt

Window

Sliding recovery interval

Limit

Configured burst capacity

Return value

Whether another attempt fits in the interval

History

type History is record
   Times    : Time_Vectors.Vector;
   Capacity : Natural := 0;
   First    : Positive := 1;
   Count    : Natural := 0;
end record;

@exclude

Record fields
Times

Reserved timestamp storage

Capacity

Configured maximum retained attempts

First

Oldest retained timestamp index

Count

Number of retained timestamps

Initialize

procedure Initialize (Item : in out History; Limit : Positive)

@exclude

Parameters
Item

History to reserve

Limit

Configured burst capacity

Record_Attempt

procedure Record_Attempt (Item : in out History; Now : Ada.Real_Time.Time)

@exclude

Parameters
Item

History to update

Now

Time of admitted attempt

Reset

procedure Reset (Item : in out History)

@exclude

Parameters
Item

History to clear for reuse

Time_Vectors

package Time_Vectors is new Ada.Containers.Vectors (Positive, Ada.Real_Time.Time);

@exclude