Server IP : 111.118.215.189 / Your IP : 18.216.95.250 Web Server : Apache System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : a1673wkz ( 2475) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /usr/share/ruby/vendor_ruby/puppet/util/watcher/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
# Watches for changes over time. It only re-examines the values when it is requested to update readings. # @api private class Puppet::Util::Watcher::ChangeWatcher def self.watch(reader) Puppet::Util::Watcher::ChangeWatcher.new(nil, nil, reader).next_reading end def initialize(previous, current, value_reader) @previous = previous @current = current @value_reader = value_reader end def changed? if uncertain? false else @previous != @current end end def uncertain? @previous.nil? || @current.nil? end def change_current_reading_to(new_value) Puppet::Util::Watcher::ChangeWatcher.new(@current, new_value, @value_reader) end def next_reading change_current_reading_to(@value_reader.call) end end