Class: IceGrid::ServerDynamicInfo

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id = '', state = ::IceGrid::ServerState::Inactive, pid = 0, enabled = false) ⇒ ServerDynamicInfo

Returns a new instance of ServerDynamicInfo.



32
33
34
35
36
37
# File 'lib/IceGrid/Observer.rb', line 32

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.



65
66
67
# File 'lib/IceGrid/Observer.rb', line 65

def enabled
  @enabled
end

#idObject

Returns the value of attribute id.



65
66
67
# File 'lib/IceGrid/Observer.rb', line 65

def id
  @id
end

#pidObject

Returns the value of attribute pid.



65
66
67
# File 'lib/IceGrid/Observer.rb', line 65

def pid
  @pid
end

#stateObject

Returns the value of attribute state.



65
66
67
# File 'lib/IceGrid/Observer.rb', line 65

def state
  @state
end

Instance Method Details

#==(other) ⇒ Object



48
49
50
51
52
53
54
55
# File 'lib/IceGrid/Observer.rb', line 48

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)


57
58
59
# File 'lib/IceGrid/Observer.rb', line 57

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

#hashObject



39
40
41
42
43
44
45
46
# File 'lib/IceGrid/Observer.rb', line 39

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

#inspectObject



61
62
63
# File 'lib/IceGrid/Observer.rb', line 61

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