Class: ThreadSafe::SynchronizedCacheBackend
Instance Method Summary
collapse
Instance Method Details
#[](key) ⇒ Object
WARNING: Mutex_m is a non-reentrant lock, so the synchronized methods are
not allowed to call each other.
8
9
10
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 8
def [](key)
synchronize { super }
end
|
#[]=(key, value) ⇒ Object
12
13
14
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 12
def []=(key, value)
synchronize { super }
end
|
#clear ⇒ Object
60
61
62
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 60
def clear
synchronize { super }
end
|
#compute(key) ⇒ Object
24
25
26
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 24
def compute(key)
synchronize { super }
end
|
#compute_if_absent(key) ⇒ Object
16
17
18
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 16
def compute_if_absent(key)
synchronize { super }
end
|
#compute_if_present(key) ⇒ Object
20
21
22
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 20
def compute_if_present(key)
synchronize { super }
end
|
#delete(key) ⇒ Object
52
53
54
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 52
def delete(key)
synchronize { super }
end
|
#delete_pair(key, value) ⇒ Object
56
57
58
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 56
def delete_pair(key, value)
synchronize { super }
end
|
#get_and_set(key, value) ⇒ Object
40
41
42
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 40
def get_and_set(key, value)
synchronize { super }
end
|
#get_or_default(key, default_value) ⇒ Object
68
69
70
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 68
def get_or_default(key, default_value)
synchronize { super }
end
|
#key?(key) ⇒ Boolean
44
45
46
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 44
def key?(key)
synchronize { super }
end
|
#merge_pair(key, value) ⇒ Object
28
29
30
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 28
def merge_pair(key, value)
synchronize { super }
end
|
#replace_if_exists(key, new_value) ⇒ Object
36
37
38
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 36
def replace_if_exists(key, new_value)
synchronize { super }
end
|
#replace_pair(key, old_value, new_value) ⇒ Object
32
33
34
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 32
def replace_pair(key, old_value, new_value)
synchronize { super }
end
|
#size ⇒ Object
64
65
66
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 64
def size
synchronize { super }
end
|
#value?(value) ⇒ Boolean
48
49
50
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 48
def value?(value)
synchronize { super }
end
|