Class: Triglav::Agent::Base::Connection

Inherits:
Object
  • Object
show all
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

Constructor Details

#initialize(connection_info) ⇒ Connection

Returns a new instance of Connection

Parameters:

  • connection_info (Hash)

Raises:

  • (NotImplementedError)


20
21
22
# File 'lib/triglav/agent/base/connection.rb', line 20

def initialize(connection_info)
  raise NotImplementedError
end

Instance Method Details

#closeObject

close the connection

Raises:

  • (NotImplementedError)


25
26
27
# File 'lib/triglav/agent/base/connection.rb', line 25

def close
  raise NotImplementedError
end