Class: ThreadSafe::SynchronizedCacheBackend
- Inherits:
-
NonConcurrentCacheBackend
show all
- Includes:
- Mutex_m
- Defined in:
- lib/thread_safe/synchronized_cache_backend.rb
Instance Method Summary
(collapse)
Instance Method Details
- (Object) [](key)
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
|
- (Object) []=(key, value)
12
13
14
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 12
def []=(key, value)
synchronize { super }
end
|
- (Object) clear
60
61
62
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 60
def clear
synchronize { super }
end
|
- (Object) compute(key)
24
25
26
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 24
def compute(key)
synchronize { super }
end
|
- (Object) compute_if_absent(key)
16
17
18
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 16
def compute_if_absent(key)
synchronize { super }
end
|
- (Object) compute_if_present(key)
20
21
22
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 20
def compute_if_present(key)
synchronize { super }
end
|
- (Object) delete(key)
52
53
54
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 52
def delete(key)
synchronize { super }
end
|
- (Object) delete_pair(key, value)
56
57
58
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 56
def delete_pair(key, value)
synchronize { super }
end
|
- (Object) get_and_set(key, value)
40
41
42
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 40
def get_and_set(key, value)
synchronize { super }
end
|
- (Object) get_or_default(key, default_value)
68
69
70
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 68
def get_or_default(key, default_value)
synchronize { super }
end
|
- (Boolean) key?(key)
44
45
46
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 44
def key?(key)
synchronize { super }
end
|
- (Object) merge_pair(key, value)
28
29
30
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 28
def merge_pair(key, value)
synchronize { super }
end
|
- (Object) replace_if_exists(key, new_value)
36
37
38
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 36
def replace_if_exists(key, new_value)
synchronize { super }
end
|
- (Object) replace_pair(key, old_value, new_value)
32
33
34
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 32
def replace_pair(key, old_value, new_value)
synchronize { super }
end
|
- (Object) size
64
65
66
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 64
def size
synchronize { super }
end
|
- (Boolean) value?(value)
48
49
50
|
# File 'lib/thread_safe/synchronized_cache_backend.rb', line 48
def value?(value)
synchronize { super }
end
|