Class: Ice::ACM

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Inspect_mixin

#inspect

Constructor Details

#initialize(timeout = 0, close = ::Ice::ACMClose::CloseOff, heartbeat = ::Ice::ACMHeartbeat::HeartbeatOff) ⇒ ACM

Returns a new instance of ACM.



220
221
222
223
224
# File 'lib/Ice/Connection.rb', line 220

def initialize(timeout=0, close=::Ice::ACMClose::CloseOff, heartbeat=::Ice::ACMHeartbeat::HeartbeatOff)
    @timeout = timeout
    @close = close
    @heartbeat = heartbeat
end

Instance Attribute Details

#closeObject

Returns the value of attribute close.



246
247
248
# File 'lib/Ice/Connection.rb', line 246

def close
  @close
end

#heartbeatObject

Returns the value of attribute heartbeat.



246
247
248
# File 'lib/Ice/Connection.rb', line 246

def heartbeat
  @heartbeat
end

#timeoutObject

Returns the value of attribute timeout.



246
247
248
# File 'lib/Ice/Connection.rb', line 246

def timeout
  @timeout
end

Instance Method Details

#==(other) ⇒ Object



234
235
236
237
238
239
240
# File 'lib/Ice/Connection.rb', line 234

def ==(other)
    return false if !other.is_a? ::Ice::ACM or
        @timeout != other.timeout or
        @close != other.close or
        @heartbeat != other.heartbeat
    true
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


242
243
244
# File 'lib/Ice/Connection.rb', line 242

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

#hashObject



226
227
228
229
230
231
232
# File 'lib/Ice/Connection.rb', line 226

def hash
    _h = 0
    _h = 5 * _h + @timeout.hash
    _h = 5 * _h + @close.hash
    _h = 5 * _h + @heartbeat.hash
    _h % 0x7fffffff
end