Rebornbuddy
Loading...
Searching...
No Matches
ff14bot.Behavior.ThrottlePasses Class Reference

Implements a 'throttle' composite. This composite limits the number of times the child will be run within a given time span. Returns cappedStatus if limit reached, otherwise Returns result of child. More...

Inheritance diagram for ff14bot.Behavior.ThrottlePasses:

Public Member Functions

 ThrottlePasses (int limit, TimeSpan timeFrame, RunStatus limitStatus, Composite child)
 Implements a 'throttle' composite. This composite limits the number of times the child will be run within a given time span. Returns cappedStatus for attempts after limit reached, otherwise returns result of child.
 ThrottlePasses (TimeSpan timeFrame, Composite child)
 Implements a 'throttle' composite. This composite limits the number of times the child to running once within a given time span. Returns Failure if attempted to run after limit reached in timeframe, otherwise returns result of child.
 ThrottlePasses (int Limit, int timeSeconds, Composite child)
 Implements a 'throttle' composite. This composite limits the number of times the child will be run within a given time span. Returns Failure for attempts after limit reached, otherwise returns result of child.
 ThrottlePasses (int Limit, TimeSpan ts, Composite child)
 Implements a 'throttle' composite. This composite limits the number of times the child will be run within a given time span. Returns Failure for attempts after limit reached, otherwise returns result of child.
 ThrottlePasses (int timeSeconds, Composite child)
 Implements a 'throttle' composite. This composite limits the number of times the child will be run within a given time span. Returns Failure if limit reached, otherwise Returns result of child.
override void Start (object context)
override void Stop (object context)

Protected Member Functions

override IEnumerable< RunStatus > Execute (object context)

Properties

TimeSpan TimeFrame [get, set]
 time span that Limit child Successes can occur
int Limit [get, set]
 maximum number of child Successes that can occur within TimeFrame

Detailed Description

Implements a 'throttle' composite. This composite limits the number of times the child will be run within a given time span. Returns cappedStatus if limit reached, otherwise Returns result of child.

Created 10/28/2012.

Constructor & Destructor Documentation

◆ ThrottlePasses() [1/5]

ff14bot.Behavior.ThrottlePasses.ThrottlePasses ( int limit,
TimeSpan timeFrame,
RunStatus limitStatus,
Composite child )

Implements a 'throttle' composite. This composite limits the number of times the child will be run within a given time span. Returns cappedStatus for attempts after limit reached, otherwise returns result of child.

Parameters
limitmax number of occurrences
timeFrametime span for occurrences
limitStatusRunStatus to return when limit reached
childcomposite children to tick (run)

◆ ThrottlePasses() [2/5]

ff14bot.Behavior.ThrottlePasses.ThrottlePasses ( TimeSpan timeFrame,
Composite child )

Implements a 'throttle' composite. This composite limits the number of times the child to running once within a given time span. Returns Failure if attempted to run after limit reached in timeframe, otherwise returns result of child.

Parameters
timeFramewait TimeSpan after child success before another attempt
childcomposite children to tick (run)

◆ ThrottlePasses() [3/5]

ff14bot.Behavior.ThrottlePasses.ThrottlePasses ( int Limit,
int timeSeconds,
Composite child )

Implements a 'throttle' composite. This composite limits the number of times the child will be run within a given time span. Returns Failure for attempts after limit reached, otherwise returns result of child.

Parameters
Limitmax number of occurrences
timeSecondstime span for occurrences in seconds
childcomposite children to tick (run)

◆ ThrottlePasses() [4/5]

ff14bot.Behavior.ThrottlePasses.ThrottlePasses ( int Limit,
TimeSpan ts,
Composite child )

Implements a 'throttle' composite. This composite limits the number of times the child will be run within a given time span. Returns Failure for attempts after limit reached, otherwise returns result of child.

Parameters
Limitmax number of occurrences
tstime span for occurrences in seconds
childcomposite children to tick (run)

◆ ThrottlePasses() [5/5]

ff14bot.Behavior.ThrottlePasses.ThrottlePasses ( int timeSeconds,
Composite child )

Implements a 'throttle' composite. This composite limits the number of times the child will be run within a given time span. Returns Failure if limit reached, otherwise Returns result of child.

Parameters
timeSecondstime span for occurrences in seconds
childcomposite children to tick (run)

Member Function Documentation

◆ Execute()

override IEnumerable< RunStatus > ff14bot.Behavior.ThrottlePasses.Execute ( object context)
protected

◆ Start()

override void ff14bot.Behavior.ThrottlePasses.Start ( object context)

◆ Stop()

override void ff14bot.Behavior.ThrottlePasses.Stop ( object context)

Property Documentation

◆ Limit

int ff14bot.Behavior.ThrottlePasses.Limit
getset

maximum number of child Successes that can occur within TimeFrame

◆ TimeFrame

TimeSpan ff14bot.Behavior.ThrottlePasses.TimeFrame
getset

time span that Limit child Successes can occur