Class: IceGrid::ServerInfo

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Ice::Inspect_mixin

#inspect

Constructor Details

#initialize(application = '', uuid = '', revision = 0, node = '', descriptor = nil, sessionId = '') ⇒ ServerInfo

Returns a new instance of ServerInfo.



171
172
173
174
175
176
177
178
# File 'lib/IceGrid/Admin.rb', line 171

def initialize(application='', uuid='', revision=0, node='', descriptor=nil, sessionId='')
    @application = application
    @uuid = uuid
    @revision = revision
    @node = node
    @descriptor = descriptor
    @sessionId = sessionId
end

Instance Attribute Details

#applicationObject

Returns the value of attribute application.



206
207
208
# File 'lib/IceGrid/Admin.rb', line 206

def application
  @application
end

#descriptorObject

Returns the value of attribute descriptor.



206
207
208
# File 'lib/IceGrid/Admin.rb', line 206

def descriptor
  @descriptor
end

#nodeObject

Returns the value of attribute node.



206
207
208
# File 'lib/IceGrid/Admin.rb', line 206

def node
  @node
end

#revisionObject

Returns the value of attribute revision.



206
207
208
# File 'lib/IceGrid/Admin.rb', line 206

def revision
  @revision
end

#sessionIdObject

Returns the value of attribute sessionId.



206
207
208
# File 'lib/IceGrid/Admin.rb', line 206

def sessionId
  @sessionId
end

#uuidObject

Returns the value of attribute uuid.



206
207
208
# File 'lib/IceGrid/Admin.rb', line 206

def uuid
  @uuid
end

Instance Method Details

#==(other) ⇒ Object



191
192
193
194
195
196
197
198
199
200
# File 'lib/IceGrid/Admin.rb', line 191

def ==(other)
    return false if !other.is_a? ::IceGrid::ServerInfo or
        @application != other.application or
        @uuid != other.uuid or
        @revision != other.revision or
        @node != other.node or
        @descriptor != other.descriptor or
        @sessionId != other.sessionId
    true
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


202
203
204
# File 'lib/IceGrid/Admin.rb', line 202

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

#hashObject



180
181
182
183
184
185
186
187
188
189
# File 'lib/IceGrid/Admin.rb', line 180

def hash
    _h = 0
    _h = 5 * _h + @application.hash
    _h = 5 * _h + @uuid.hash
    _h = 5 * _h + @revision.hash
    _h = 5 * _h + @node.hash
    _h = 5 * _h + @descriptor.hash
    _h = 5 * _h + @sessionId.hash
    _h % 0x7fffffff
end