Module: RedisQueuedLocks::Swarm::ZombieInfo Private

Defined in:
lib/redis_queued_locks/swarm/zombie_info.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.9.0

Class Method Summary collapse

Class Method Details

.zombie_acquirers(redis_client, zombie_ttl, lock_scan_size) ⇒ Set<String>

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)
  • zombie_ttl (Integer)
  • lock_scan_size (Integer)

Returns:

  • (Set<String>)

Since:

  • 1.9.0



57
58
59
60
61
# File 'lib/redis_queued_locks/swarm/zombie_info.rb', line 57

def zombie_acquirers(redis_client, zombie_ttl, lock_scan_size)
  redis_client.with do |rconn|
    extract_zombie_acquirers(rconn, zombie_ttl, lock_scan_size)
  end
end

.zombie_hosts(redis_client, zombie_ttl) ⇒ Set<String>

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)
  • zombie_ttl (Integer)

Returns:

  • (Set<String>)

Since:

  • 1.9.0



44
45
46
47
48
# File 'lib/redis_queued_locks/swarm/zombie_info.rb', line 44

def zombie_hosts(redis_client, zombie_ttl)
  redis_client.with do |rconn|
    extract_zombie_hosts(rconn, zombie_ttl)
  end
end

.zombie_locks(redis_client, zombie_ttl, lock_scan_size) ⇒ Set<String>

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)
  • zombie_ttl (Integer)
  • lock_scan_size (Integer)

Returns:

  • (Set<String>)

Since:

  • 1.9.0



32
33
34
35
36
# File 'lib/redis_queued_locks/swarm/zombie_info.rb', line 32

def zombie_locks(redis_client, zombie_ttl, lock_scan_size)
  redis_client.with do |rconn|
    extract_zombie_locks(rconn, zombie_ttl, lock_scan_size)
  end
end

.zombies_info(redis_client, zombie_ttl, lock_scan_size) ⇒ Hash<Symbol,Set<String>>

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.

Returns Format: { zombie_hosts: <Set>, zombie_acquirers: <Set>, zombie_locks: <Set> }.

Parameters:

  • redis_client (RedisClient)
  • zombie_ttl (Integer)
  • lock_scan_size (Integer)

Returns:

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

    Format: { zombie_hosts: <Set>, zombie_acquirers: <Set>, zombie_locks: <Set> }

Since:

  • 1.9.0



19
20
21
22
23
# File 'lib/redis_queued_locks/swarm/zombie_info.rb', line 19

def zombies_info(redis_client, zombie_ttl, lock_scan_size)
  redis_client.with do |rconn|
    extract_all(rconn, zombie_ttl, lock_scan_size)
  end
end