Class: Triglav::Agent::Base::Connection
- Inherits:
-
Object
- Object
- Triglav::Agent::Base::Connection
- Defined in:
- lib/triglav/agent/base/connection.rb
Overview
An abstract base class of Connection.
Wrap a connection to a storage. You can implement any methods which you want to use in your Monitor class.
You have to implement following methods:
-
initialize
-
close
An instance is created for each `resource_uri_prefix`, that is, shared among resources with of same `resource_uri_prefix`.
Note that multiple connection instances would be created when multiple parallel threads are created in Processor class.
Instance Method Summary collapse
-
#close ⇒ Object
close the connection.
-
#initialize(connection_info) ⇒ Connection
constructor
A new instance of Connection.
Constructor Details
#initialize(connection_info) ⇒ Connection
Returns a new instance of Connection
20 21 22 |
# File 'lib/triglav/agent/base/connection.rb', line 20 def initialize(connection_info) raise NotImplementedError end |
Instance Method Details
#close ⇒ Object
close the connection
25 26 27 |
# File 'lib/triglav/agent/base/connection.rb', line 25 def close raise NotImplementedError end |