Module: RedisQueuedLocks::Acquirer::AcquireLock::InstrVisitor Private

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

Since:

  • 1.7.0

Class Method Summary collapse

Class Method Details

.extendable_reentrant_lock_obtained(instrumenter, instr_sampled, lock_key, ttl, acq_id, hst_id, ts, acq_time, instrument) ⇒ 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:

  • instrumenter (#notify)
  • instr_sampled (Boolean)
  • lock_key (String)
  • ttl (Integer, NilClass)
  • acq_id (String)
  • hst_id (String)
  • ts (Numeric)
  • acq_time (Numeric)
  • instrument (NilClass, Any)

Since:

  • 1.7.0

Version:

  • 1.9.0



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

def extendable_reentrant_lock_obtained(
  instrumenter,
  instr_sampled,
  lock_key,
  ttl,
  acq_id,
  hst_id,
  ts,
  acq_time,
  instrument
)
  return unless instr_sampled
  instrumenter.notify('redis_queued_locks.extendable_reentrant_lock_obtained', {
    lock_key:, ttl:, acq_id:, hst_id:, ts:, acq_time:, instrument:
  }) rescue nil
end

.lock_hold_and_release(instrumenter, instr_sampled, lock_key, ttl, acq_id, hst_id, ts, acq_time, hold_time, instrument) ⇒ 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:

  • instrumenter (#notify)
  • instr_sampled (Boolean)
  • lock_key (String)
  • ttl (Integer, NilClass)
  • acq_id (String)
  • hst_id (String)
  • ts (Numeric)
  • acq_time (Numeric)
  • hold_time (Numeric)
  • instrument (NilClass, Any)

Since:

  • 1.7.0

Version:

  • 1.9.0



148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# File 'lib/redis_queued_locks/acquirer/acquire_lock/instr_visitor.rb', line 148

def lock_hold_and_release(
  instrumenter,
  instr_sampled,
  lock_key,
  ttl,
  acq_id,
  hst_id,
  ts,
  acq_time,
  hold_time,
  instrument
)
  return unless instr_sampled
  instrumenter.notify('redis_queued_locks.lock_hold_and_release', {
    hold_time:, ttl:, acq_id:, hst_id:, ts:, lock_key:, acq_time:, instrument:
  }) rescue nil
end

.lock_obtained(instrumenter, instr_sampled, lock_key, ttl, acq_id, hst_id, ts, acq_time, instrument) ⇒ 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:

  • instrumenter (#notify)
  • instr_sampled (Boolean)
  • lock_key (String)
  • ttl (Integer, NilClass)
  • acq_id (String)
  • hst_id (String)
  • ts (Numeric)
  • acq_time (Numeric)
  • instrument (NilClass, Any)

Since:

  • 1.7.0

Version:

  • 1.9.0



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/redis_queued_locks/acquirer/acquire_lock/instr_visitor.rb', line 83

def lock_obtained(
  instrumenter,
  instr_sampled,
  lock_key,
  ttl,
  acq_id,
  hst_id,
  ts,
  acq_time,
  instrument
)
  return unless instr_sampled
  instrumenter.notify('redis_queued_locks.lock_obtained', {
    lock_key:, ttl:, acq_id:, hst_id:, ts:, acq_time:, instrument:
  }) rescue nil
end

.reentrant_lock_hold_completes(instrumenter, instr_sampled, lock_key, ttl, acq_id, hst_id, ts, acq_time, hold_time, instrument) ⇒ 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:

  • instrumenter (#notify)
  • instr_sampled (Boolean)
  • lock_key (String)
  • ttl (Integer, NilClass)
  • acq_id (String)
  • hst_id (String)
  • ts (Numeric)
  • acq_time (Numeric)
  • hold_time (Numeric)
  • instrument (NilClass, Any)

Since:

  • 1.7.0

Version:

  • 1.9.0



115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/redis_queued_locks/acquirer/acquire_lock/instr_visitor.rb', line 115

def reentrant_lock_hold_completes(
  instrumenter,
  instr_sampled,
  lock_key,
  ttl,
  acq_id,
  hst_id,
  ts,
  acq_time,
  hold_time,
  instrument
)
  return unless instr_sampled
  instrumenter.notify('redis_queued_locks.reentrant_lock_hold_completes', {
    hold_time:, ttl:, acq_id:, hst_id:, ts:, lock_key:, acq_time:, instrument:
  }) rescue nil
end

.reentrant_lock_obtained(instrumenter, instr_sampled, lock_key, ttl, acq_id, hst_id, ts, acq_time, instrument) ⇒ 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:

  • instrumenter (#notify)
  • instr_sampled (Boolean)
  • lock_key (String)
  • ttl (Integer, NilClass)
  • acq_id (String)
  • hst_id (String)
  • ts (Numeric)
  • acq_time (Numeric)
  • instrument (NilClass, Any)

Since:

  • 1.7.0

Version:

  • 1.9.0



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/redis_queued_locks/acquirer/acquire_lock/instr_visitor.rb', line 52

def reentrant_lock_obtained(
  instrumenter,
  instr_sampled,
  lock_key,
  ttl,
  acq_id,
  hst_id,
  ts,
  acq_time,
  instrument
)
  return unless instr_sampled
  instrumenter.notify('redis_queued_locks.reentrant_lock_obtained', {
    lock_key:, ttl:, acq_id:, hst_id:, ts:, acq_time:, instrument:
  }) rescue nil
end