Class: Concurrent::Collection::MriMapBackend
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
NonConcurrentMapBackend
|
|
Instance Chain:
self,
NonConcurrentMapBackend
|
|
Inherits: |
Concurrent::Collection::NonConcurrentMapBackend
|
Defined in: | lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb |
Class Method Summary
NonConcurrentMapBackend
- Inherited
.new | WARNING: all public methods of the class must operate on the @backend directly without calling each other. |
Instance Method Summary
- #[]=(key, value)
- #clear
- #compute(key)
- #compute_if_absent(key)
- #compute_if_present(key)
- #delete(key)
- #delete_pair(key, value)
- #get_and_set(key, value)
- #merge_pair(key, value)
- #replace_if_exists(key, new_value)
- #replace_pair(key, old_value, new_value)
NonConcurrentMapBackend
- Inherited
Constructor Details
.new(options = nil, &default_proc) ⇒ MriMapBackend
# File 'lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb', line 12
def initialize( = nil, &default_proc) super(, &default_proc) @write_lock = Mutex.new end
Instance Method Details
#[]=(key, value)
[ GitHub ]# File 'lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb', line 17
def []=(key, value) @write_lock.synchronize { super } end
#clear
[ GitHub ]# File 'lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb', line 61
def clear @write_lock.synchronize { super } end
#compute(key)
[ GitHub ]# File 'lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb', line 33
def compute(key) @write_lock.synchronize { super } end
#compute_if_absent(key)
[ GitHub ]#compute_if_present(key)
[ GitHub ]# File 'lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb', line 29
def compute_if_present(key) @write_lock.synchronize { super } end
#delete(key)
[ GitHub ]# File 'lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb', line 53
def delete(key) @write_lock.synchronize { super } end
#delete_pair(key, value)
[ GitHub ]# File 'lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb', line 57
def delete_pair(key, value) @write_lock.synchronize { super } end
#get_and_set(key, value)
[ GitHub ]# File 'lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb', line 49
def get_and_set(key, value) @write_lock.synchronize { super } end
#merge_pair(key, value)
[ GitHub ]# File 'lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb', line 37
def merge_pair(key, value) @write_lock.synchronize { super } end
#replace_if_exists(key, new_value)
[ GitHub ]# File 'lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb', line 45
def replace_if_exists(key, new_value) @write_lock.synchronize { super } end
#replace_pair(key, old_value, new_value)
[ GitHub ]# File 'lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb', line 41
def replace_pair(key, old_value, new_value) @write_lock.synchronize { super } end