Class: OnlinePayments::SDK::PooledConnection

Inherits:
Connection
  • Object
show all
Defined in:
lib/onlinepayments/sdk/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.

Direct Known Subclasses

DefaultImpl::DefaultConnection

Instance Method Summary collapse

Methods inherited from Connection

#delete, #get, #post, #put

Methods included from Logging::LoggingCapable

#disable_logging, #enable_logging

Instance Method Details

#close_expired_connectionsObject

Closes all connections that have expired.

Raises:

  • (NotImplementedError)


17
18
19
# File 'lib/onlinepayments/sdk/pooled_connection.rb', line 17

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)


12
13
14
# File 'lib/onlinepayments/sdk/pooled_connection.rb', line 12

def close_idle_connections(idle_time)
  raise NotImplementedError
end