Class: Worldline::Acquiring::SDK::Communication::PooledConnection

Inherits:
Connection
  • Object
show all
Defined in:
lib/worldline/acquiring/sdk/communication/pooled_connection.rb

Overview

Connection that supports connection pooling. This is used to more efficiently communicate using HTTP. Connection pooling means that a number of connections are kept alive after use so they can possibly be reused. If the Connection does not do so automatically, the methods close_idle_connections and close_expired_connections can be used to drop connections that are idle for a specified amount of time or that have expired.

See Also:

Direct Known Subclasses

DefaultConnection

Instance Method Summary collapse

Methods inherited from Connection

#delete, #get, #post, #put

Methods included from Logging::Obfuscation::ObfuscationCapable

#set_body_obfuscator, #set_header_obfuscator

Methods included from Logging::LoggingCapable

#disable_logging, #enable_logging

Instance Method Details

#close_expired_connectionsObject

Closes all connections that have expired.

Raises:

  • (NotImplementedError)


21
22
23
# File 'lib/worldline/acquiring/sdk/communication/pooled_connection.rb', line 21

def close_expired_connections
  raise NotImplementedError
end

#close_idle_connections(idle_time) ⇒ Object

Closes all connections that have not been used for idle_time seconds.

Raises:

  • (NotImplementedError)


16
17
18
# File 'lib/worldline/acquiring/sdk/communication/pooled_connection.rb', line 16

def close_idle_connections(idle_time)
  raise NotImplementedError
end