Module: RedisQueuedLocks::Acquirer::Locks Private

Defined in:
lib/redis_queued_locks/acquirer/locks.rb

Overview

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

Since:

  • 1.0.0

Class Method Summary collapse

Class Method Details

.locks(redis_client, scan_size:, with_info:) ⇒ Set<String>, Set<Hash<Symbol,Any>>

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.

Parameters:

  • redis_client (RedisClient)
  • scan_size (Hash) —

    a customizable set of options

  • with_info (Hash) —

    a customizable set of options

Options Hash (scan_size:):

  • (Integer)

Options Hash (with_info:):

  • (Boolean)

Returns:

  • (Set<String>, Set<Hash<Symbol,Any>>)

Since:

  • 1.0.0



14
15
16
17
18
19
# File 'lib/redis_queued_locks/acquirer/locks.rb', line 14

def locks(redis_client, scan_size:, with_info:)
  redis_client.with do |rconn|
    lock_keys = scan_locks(rconn, scan_size)
    with_info ? extract_locks_info(rconn, lock_keys) : lock_keys
  end
end