Class: Messaging::Adapters::Postgres::AdvisoryTransactionLock Private
- Inherits:
-
Object
- Object
- Messaging::Adapters::Postgres::AdvisoryTransactionLock
- 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
- #call ⇒ Object private
Instance Method Details
#call ⇒ Object
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 |