NAME

Argon::Tracker - Internal class used to track node capacity

VERSION

version 0.18

DESCRIPTION

An internally used class that tracks capacity of worker nodes.

ATTRIBUTES

length

The number of completed past transactions used to calculate load.

capacity

The capacity as the sum of tracked worker capacities.

METHODS

add_capacity

Increment capacity by the supplied value.

remove_capacity

Decrement capacity by the supplied value.

available_capacity

Returns the number of task slots available; equivalent to the total capacity less the number of actively tracked tasks.

has_capacity

Returns true if the "available_capacity" is greater than zero.

load

Estimates and returns the time required to complete one more than the number of currently tracked tasks.

age

Returns the number of seconds since the tracker began tracking the supplied Argon::Message.

start

Begins tracking an Argon::Message.

finish

Completes tracking on an Argon::Message.

touch

Resets the start time on an Argon::Message.

AUTHOR

Jeff Ober <sysread@fastmail.fm>

COPYRIGHT AND LICENSE

This software is copyright (c) 2017 by Jeff Ober.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.