Class: Messaging::Adapters::Postgres::AdvisoryTransactionLock Private

Inherits:
Object
  • Object
show all
Includes:
MethodObject
Defined in:
lib/messaging/adapters/postgres/advisory_transaction_lock.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Creates an advisory lock that is held during the rest of the transaction. If another session is trying to aquire the same lock it will wait until the lock is released.

Instance Method Summary collapse

Instance Method Details

#callObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



16
17
18
# File 'lib/messaging/adapters/postgres/advisory_transaction_lock.rb', line 16

def call
  connection.execute "SELECT pg_advisory_xact_lock(#{lock_key});"
end