Class: IceGrid::NodeInfo

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = '', os = '', hostname = '', release = '', version = '', machine = '', nProcessors = 0, dataDir = '') ⇒ NodeInfo

Returns a new instance of NodeInfo.



239
240
241
242
243
244
245
246
247
248
# File 'lib/IceGrid/Admin.rb', line 239

def initialize(name='', os='', hostname='', release='', version='', machine='', nProcessors=0, dataDir='')
    @name = name
    @os = os
    @hostname = hostname
    @release = release
    @version = version
    @machine = machine
    @nProcessors = nProcessors
    @dataDir = dataDir
end

Instance Attribute Details

#dataDirObject

Returns the value of attribute dataDir.



284
285
286
# File 'lib/IceGrid/Admin.rb', line 284

def dataDir
  @dataDir
end

#hostnameObject

Returns the value of attribute hostname.



284
285
286
# File 'lib/IceGrid/Admin.rb', line 284

def hostname
  @hostname
end

#machineObject

Returns the value of attribute machine.



284
285
286
# File 'lib/IceGrid/Admin.rb', line 284

def machine
  @machine
end

#nameObject

Returns the value of attribute name.



284
285
286
# File 'lib/IceGrid/Admin.rb', line 284

def name
  @name
end

#nProcessorsObject

Returns the value of attribute nProcessors.



284
285
286
# File 'lib/IceGrid/Admin.rb', line 284

def nProcessors
  @nProcessors
end

#osObject

Returns the value of attribute os.



284
285
286
# File 'lib/IceGrid/Admin.rb', line 284

def os
  @os
end

#releaseObject

Returns the value of attribute release.



284
285
286
# File 'lib/IceGrid/Admin.rb', line 284

def release
  @release
end

#versionObject

Returns the value of attribute version.



284
285
286
# File 'lib/IceGrid/Admin.rb', line 284

def version
  @version
end

Instance Method Details

#==(other) ⇒ Object



263
264
265
266
267
268
269
270
271
272
273
274
# File 'lib/IceGrid/Admin.rb', line 263

def ==(other)
    return false if !other.is_a? ::IceGrid::NodeInfo or
        @name != other.name or
        @os != other.os or
        @hostname != other.hostname or
        @release != other.release or
        @version != other.version or
        @machine != other.machine or
        @nProcessors != other.nProcessors or
        @dataDir != other.dataDir
    true
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


276
277
278
# File 'lib/IceGrid/Admin.rb', line 276

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

#hashObject



250
251
252
253
254
255
256
257
258
259
260
261
# File 'lib/IceGrid/Admin.rb', line 250

def hash
    _h = 0
    _h = 5 * _h + @name.hash
    _h = 5 * _h + @os.hash
    _h = 5 * _h + @hostname.hash
    _h = 5 * _h + @release.hash
    _h = 5 * _h + @version.hash
    _h = 5 * _h + @machine.hash
    _h = 5 * _h + @nProcessors.hash
    _h = 5 * _h + @dataDir.hash
    _h % 0x7fffffff
end

#inspectObject



280
281
282
# File 'lib/IceGrid/Admin.rb', line 280

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