class Orientdb4r::Node

This class represents a single sever/node in the Distributed Multi-Master Architecture.

Attributes

host[R]
port[R]
session_id[R]

Public Class Methods

new(host, port) click to toggle source

Constructor.

# File lib/orientdb4r/node.rb, line 14
def initialize(host, port)
  raise ArgumentError, 'host cannot be blank' if blank? host
  raise ArgumentError, 'port cannot be blank' if blank? port
  @host = host
  @port = port
end

Public Instance Methods

cleanup() click to toggle source

Cleans up resources used by the node.

# File lib/orientdb4r/node.rb, line 24
def cleanup
  @session_id = nil
end
url() click to toggle source

Gets URL of the remote node.

# File lib/orientdb4r/node.rb, line 31
def url
  raise NotImplementedError, 'this should be overridden by subclass'
end