Class: IceGrid::NodeDynamicInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/IceGrid/Observer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(info = ::IceGrid::NodeInfo.new, servers = nil, adapters = nil) ⇒ NodeDynamicInfo

Returns a new instance of NodeDynamicInfo.



124
125
126
127
128
# File 'lib/IceGrid/Observer.rb', line 124

def initialize(info=::IceGrid::NodeInfo.new, servers=nil, adapters=nil)
    @info = info
    @servers = servers
    @adapters = adapters
end

Instance Attribute Details

#adaptersObject

Returns the value of attribute adapters.



154
155
156
# File 'lib/IceGrid/Observer.rb', line 154

def adapters
  @adapters
end

#infoObject

Returns the value of attribute info.



154
155
156
# File 'lib/IceGrid/Observer.rb', line 154

def info
  @info
end

#serversObject

Returns the value of attribute servers.



154
155
156
# File 'lib/IceGrid/Observer.rb', line 154

def servers
  @servers
end

Instance Method Details

#==(other) ⇒ Object



138
139
140
141
142
143
144
# File 'lib/IceGrid/Observer.rb', line 138

def ==(other)
    return false if !other.is_a? ::IceGrid::NodeDynamicInfo or
        @info != other.info or
        @servers != other.servers or
        @adapters != other.adapters
    true
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


146
147
148
# File 'lib/IceGrid/Observer.rb', line 146

def eql?(other)
    return other.class == self.class && other == self
end

#hashObject



130
131
132
133
134
135
136
# File 'lib/IceGrid/Observer.rb', line 130

def hash
    _h = 0
    _h = 5 * _h + @info.hash
    _h = 5 * _h + @servers.hash
    _h = 5 * _h + @adapters.hash
    _h % 0x7fffffff
end

#inspectObject



150
151
152
# File 'lib/IceGrid/Observer.rb', line 150

def inspect
    ::Ice::__stringify(self, T_NodeDynamicInfo)
end