Module: BrokerSyncDebug

Defined in:
lib/VMwareWebService/broker_sync_debug.rb

Instance Method Summary collapse

Instance Method Details

#alloc_sync_lock(lock_name) ⇒ Object



25
26
27
28
29
30
31
32
# File 'lib/VMwareWebService/broker_sync_debug.rb', line 25

def alloc_sync_lock(lock_name)
  lock = Sync.new
  lock.extend(SyncDebug_m)
  lock.lock_name = lock_name
  VimBaseSyncDebug.vsd_set_callbacks(lock)
  lock.watchdog_enabled = true
  lock
end

#config_lockObject



9
10
11
# File 'lib/VMwareWebService/broker_sync_debug.rb', line 9

def config_lock
  alloc_sync_lock("#{self.class.name}#configLock")
end

#connection_lockObject



5
6
7
# File 'lib/VMwareWebService/broker_sync_debug.rb', line 5

def connection_lock
  alloc_sync_lock("#{self.class.name}#connectionLock")
end

#sync_for_drbObject



17
18
19
# File 'lib/VMwareWebService/broker_sync_debug.rb', line 17

def sync_for_drb
  alloc_sync_lock("DRB#mutex")
end

#sync_for_drb_drbconnObject



21
22
23
# File 'lib/VMwareWebService/broker_sync_debug.rb', line 21

def sync_for_drb_drbconn
  alloc_sync_lock("DRb::DRbConn#mutex")
end

#sync_for_lock_hash(key) ⇒ Object



13
14
15
# File 'lib/VMwareWebService/broker_sync_debug.rb', line 13

def sync_for_lock_hash(key)
  alloc_sync_lock("#{self.class.name}#lockHash[#{key}]")
end