Class: DRb::DRbMessage
- Inherits:
-
Object
- Object
- DRb::DRbMessage
- Defined in:
- lib/VMwareWebService/DMiqVimSync.rb
Overview
module DMiqVimSync
Instance Method Summary collapse
-
#dump(obj, error = false) ⇒ Object
This is the DRB half of the dupObj locking scheme.
- #dump_original ⇒ Object
Instance Method Details
#dump(obj, error = false) ⇒ Object
This is the DRB half of the dupObj locking scheme. If we get a MiqDrbReturn object, we marshal the object it wraps and release the lock.
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/VMwareWebService/DMiqVimSync.rb', line 29 def dump(obj, error = false) # # Place a temp hold on the object until the client registers it. # obj.holdBrokerObj if obj.respond_to?(:holdBrokerObj) return(dump_original(obj, error)) unless obj.kind_of?(MiqDrbReturn) begin return(dump_original(obj.obj, error)) ensure if obj.lock && obj.lock.sync_locked? $vim_log.debug "DRb::DRbMessage.dump: UNLOCKING [#{Thread.current.object_id}] <#{obj.obj.object_id}>" if $vim_log.debug? obj.lock.sync_unlock end end end |
#dump_original ⇒ Object
23 |
# File 'lib/VMwareWebService/DMiqVimSync.rb', line 23 alias_method :dump_original, :dump |