Class: IceGrid::ServerDynamicInfo

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(id = '', state = ::IceGrid::ServerState::Inactive, pid = 0, enabled = false) ⇒ ServerDynamicInfo

Returns a new instance of ServerDynamicInfo.



714
715
716
717
718
719
# File 'ruby/IceGrid/Admin.rb', line 714

def initialize(id='', state=::IceGrid::ServerState::Inactive, pid=0, enabled=false)
    @id = id
    @state = state
    @pid = pid
    @enabled = enabled
end

Instance Attribute Details

#enabledObject

Returns the value of attribute enabled.



743
744
745
# File 'ruby/IceGrid/Admin.rb', line 743

def enabled
  @enabled
end

#idObject

Returns the value of attribute id.



743
744
745
# File 'ruby/IceGrid/Admin.rb', line 743

def id
  @id
end

#pidObject

Returns the value of attribute pid.



743
744
745
# File 'ruby/IceGrid/Admin.rb', line 743

def pid
  @pid
end

#stateObject

Returns the value of attribute state.



743
744
745
# File 'ruby/IceGrid/Admin.rb', line 743

def state
  @state
end

Instance Method Details

#==(other) ⇒ Object



730
731
732
733
734
735
736
737
# File 'ruby/IceGrid/Admin.rb', line 730

def ==(other)
    return false if !other.is_a? ::IceGrid::ServerDynamicInfo or
        @id != other.id or
        @state != other.state or
        @pid != other.pid or
        @enabled != other.enabled
    true
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


739
740
741
# File 'ruby/IceGrid/Admin.rb', line 739

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

#hashObject



721
722
723
724
725
726
727
728
# File 'ruby/IceGrid/Admin.rb', line 721

def hash
    _h = 0
    _h = 5 * _h + @id.hash
    _h = 5 * _h + @state.hash
    _h = 5 * _h + @pid.hash
    _h = 5 * _h + @enabled.hash
    _h % 0x7fffffff
end