Class: Puppet::Network::HTTP::NoCachePool Private
- Defined in:
- lib/puppet/network/http/nocache_pool.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
A pool that does not cache HTTP connections.
Instance Method Summary collapse
- #close ⇒ Object private
-
#initialize(factory = Puppet::Network::HTTP::Factory.new) ⇒ NoCachePool
constructor
private
A new instance of NoCachePool.
-
#with_connection(site, verifier) {|http| ... } ⇒ Object
private
Yields a
Net::HTTP
connection.
Methods inherited from BasePool
Constructor Details
#initialize(factory = Puppet::Network::HTTP::Factory.new) ⇒ NoCachePool
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of NoCachePool.
5 6 7 |
# File 'lib/puppet/network/http/nocache_pool.rb', line 5 def initialize(factory = Puppet::Network::HTTP::Factory.new) @factory = factory end |
Instance Method Details
#close ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 |
# File 'lib/puppet/network/http/nocache_pool.rb', line 23 def close # do nothing end |
#with_connection(site, verifier) {|http| ... } ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Yields a Net::HTTP
connection.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/puppet/network/http/nocache_pool.rb', line 12 def with_connection(site, verifier, &block) http = @factory.create_connection(site) start(site, verifier, http) begin yield http ensure Puppet.debug("Closing connection for #{site}") http.finish end end |