Module: RedisQueuedLocks::Acquirer::AcquireLock::LogVisitor Private

Defined in:
lib/redis_queued_locks/acquirer/acquire_lock/log_visitor.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.

rubocop:disable Metrics/ModuleLength

Since:

  • 1.7.0

Class Method Summary collapse

Class Method Details

.dead_score_reached__reset_acquirer_position(logger, log_sampled, lock_key, queue_ttl, acquirer_id, host_id, access_strategy) ⇒ void

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.

This method returns an undefined value.

Parameters:

  • logger (::Logger, #debug)
  • log_sampled (Boolean)
  • lock_key (String)
  • queue_ttl (Integer)
  • acquirer_id (String)
  • host_id (String)
  • access_strategy (Symbol)

Since:

  • 1.7.0

Version:

  • 1.9.0



87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/redis_queued_locks/acquirer/acquire_lock/log_visitor.rb', line 87

def dead_score_reached__reset_acquirer_position(
  logger,
  log_sampled,
  lock_key,
  queue_ttl,
  acquirer_id,
  host_id,
  access_strategy
)
  return unless log_sampled

  logger.debug do
    "[redis_queued_locks.dead_score_reached__reset_acquirer_position] " \
    "lock_key => '#{lock_key}' " \
    "queue_ttl => #{queue_ttl} " \
    "acq_id => '#{acquirer_id}' " \
    "hst_id => '#{host_id}' " \
    "acs_strat => '#{access_strategy}'"
  end rescue nil
end

.extendable_reentrant_lock_obtained(logger, log_sampled, lock_key, queue_ttl, acquirer_id, host_id, acq_time, access_strategy) ⇒ void

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.

This method returns an undefined value.

Parameters:

  • logger (::Logger, #debug)
  • log_sampled (Boolean)
  • lock_key (String)
  • queue_ttl (Integer)
  • acquirer_id (String)
  • host_id (String)
  • acq_time (Numeric)
  • access_strategy (Symbol)

Since:

  • 1.7.0

Version:

  • 1.9.0



121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# File 'lib/redis_queued_locks/acquirer/acquire_lock/log_visitor.rb', line 121

def extendable_reentrant_lock_obtained(
  logger,
  log_sampled,
  lock_key,
  queue_ttl,
  acquirer_id,
  host_id,
  acq_time,
  access_strategy
)
  return unless log_sampled

  logger.debug do
    "[redis_queued_locks.extendable_reentrant_lock_obtained] " \
    "lock_key => '#{lock_key}' " \
    "queue_ttl => #{queue_ttl} " \
    "acq_id => '#{acquirer_id}' " \
    "host_id => '#{host_id}' " \
    "acs_strat => '#{access_strategy}' " \
    "acq_time => #{acq_time} (ms)"
  end rescue nil
end

.lock_obtained(logger, log_sampled, lock_key, queue_ttl, acquirer_id, host_id, acq_time, access_strategy) ⇒ void

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.

This method returns an undefined value.

Parameters:

  • logger (::Logger, #debug)
  • log_sampled (Boolean)
  • lock_key (String)
  • queue_ttl (Integer)
  • acquirer_id (String)
  • host_id (String)
  • acq_time (Numeric)
  • access_strategy (Symbol)

Since:

  • 1.7.0

Version:

  • 1.9.0



193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# File 'lib/redis_queued_locks/acquirer/acquire_lock/log_visitor.rb', line 193

def lock_obtained(
  logger,
  log_sampled,
  lock_key,
  queue_ttl,
  acquirer_id,
  host_id,
  acq_time,
  access_strategy
)
  return unless log_sampled

  logger.debug do
    "[redis_queued_locks.lock_obtained] " \
    "lock_key => '#{lock_key}' " \
    "queue_ttl => #{queue_ttl} " \
    "acq_id => '#{acquirer_id}' " \
    "hst_id => '#{host_id}' " \
    "acs_strat => '#{access_strategy}' " \
    "acq_time => #{acq_time} (ms)"
  end rescue nil
end

.reentrant_lock_obtained(logger, log_sampled, lock_key, queue_ttl, acquirer_id, host_id, acq_time, access_strategy) ⇒ void

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.

This method returns an undefined value.

Parameters:

  • logger (::Logger, #debug)
  • log_sampled (Boolean)
  • lock_key (String)
  • queue_ttl (Integer)
  • acquirer_id (String)
  • host_id (String)
  • acq_time (Numeric)
  • access_strategy (Symbol)

Since:

  • 1.7.0

Version:

  • 1.9.0



157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# File 'lib/redis_queued_locks/acquirer/acquire_lock/log_visitor.rb', line 157

def reentrant_lock_obtained(
  logger,
  log_sampled,
  lock_key,
  queue_ttl,
  acquirer_id,
  host_id,
  acq_time,
  access_strategy
)
  return unless log_sampled

  logger.debug do
    "[redis_queued_locks.reentrant_lock_obtained] " \
    "lock_key => '#{lock_key}' " \
    "queue_ttl => #{queue_ttl} " \
    "acq_id => '#{acquirer_id}' " \
    "hst_id => '#{host_id}' " \
    "acs_strat => '#{access_strategy}' " \
    "acq_time => #{acq_time} (ms)"
  end rescue nil
end

.start_lock_obtaining(logger, log_sampled, lock_key, queue_ttl, acquirer_id, host_id, access_strategy) ⇒ void

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.

This method returns an undefined value.

Parameters:

  • logger (::Logger, #debug)
  • log_sampled (Boolean)
  • lock_key (String)
  • queue_ttl (Integer)
  • acquirer_id (String)
  • host_id (String)
  • access_strategy (Symbol)

Since:

  • 1.7.0

Version:

  • 1.9.0



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/redis_queued_locks/acquirer/acquire_lock/log_visitor.rb', line 21

def start_lock_obtaining(
  logger,
  log_sampled,
  lock_key,
  queue_ttl,
  acquirer_id,
  host_id,
  access_strategy
)
  return unless log_sampled

  logger.debug do
    "[redis_queued_locks.start_lock_obtaining] " \
    "lock_key => '#{lock_key}' " \
    "queue_ttl => #{queue_ttl} " \
    "acq_id => '#{acquirer_id}' " \
    "hst_id => '#{host_id}' " \
    "acs_strat => '#{access_strategy}'"
  end rescue nil
end

.start_try_to_lock_cycle(logger, log_sampled, lock_key, queue_ttl, acquirer_id, host_id, access_strategy) ⇒ void

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.

This method returns an undefined value.

Parameters:

  • logger (::Logger, #debug)
  • log_sampled (Boolean)
  • lock_key (String)
  • queue_ttl (Integer)
  • acquirer_id (String)
  • host_id (String)
  • access_strategy (Symbol)

Since:

  • 1.7.0

Version:

  • 1.9.0



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/redis_queued_locks/acquirer/acquire_lock/log_visitor.rb', line 54

def start_try_to_lock_cycle(
  logger,
  log_sampled,
  lock_key,
  queue_ttl,
  acquirer_id,
  host_id,
  access_strategy
)
  return unless log_sampled

  logger.debug do
    "[redis_queued_locks.start_try_to_lock_cycle] " \
    "lock_key => '#{lock_key}' " \
    "queue_ttl => #{queue_ttl} " \
    "acq_id => '#{acquirer_id}' " \
    "hst_id => '#{host_id}' " \
    "acs_strat => '#{access_strategy}'"
  end rescue nil
end