Class: IceGrid::NodeDynamicInfo

Inherits:
Object
  • Object
show all
Includes:
Ice::Inspect_mixin
Defined in:
ruby/IceGrid/Admin.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Ice::Inspect_mixin

#inspect

Constructor Details

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

Returns a new instance of NodeDynamicInfo.



800
801
802
803
804
# File 'ruby/IceGrid/Admin.rb', line 800

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.



826
827
828
# File 'ruby/IceGrid/Admin.rb', line 826

def adapters
  @adapters
end

#infoObject

Returns the value of attribute info.



826
827
828
# File 'ruby/IceGrid/Admin.rb', line 826

def info
  @info
end

#serversObject

Returns the value of attribute servers.



826
827
828
# File 'ruby/IceGrid/Admin.rb', line 826

def servers
  @servers
end

Instance Method Details

#==(other) ⇒ Object



814
815
816
817
818
819
820
# File 'ruby/IceGrid/Admin.rb', line 814

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)


822
823
824
# File 'ruby/IceGrid/Admin.rb', line 822

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

#hashObject



806
807
808
809
810
811
812
# File 'ruby/IceGrid/Admin.rb', line 806

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