class Concurrent::Collection::MriMapBackend
@!visibility private
Public Class Methods
new(options = nil, &default_proc)
click to toggle source
Calls superclass method
# File lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb, line 12 def initialize(options = nil, &default_proc) super(options, &default_proc) @write_lock = Mutex.new end
Public Instance Methods
[]=(key, value)
click to toggle source
Calls superclass method
# File lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb, line 17 def []=(key, value) @write_lock.synchronize { super } end
clear()
click to toggle source
Calls superclass method
# File lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb, line 61 def clear @write_lock.synchronize { super } end
compute(key)
click to toggle source
Calls superclass method
# 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)
click to toggle source
Calls superclass method
# File lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb, line 21 def compute_if_absent(key) if NULL != (stored_value = @backend.fetch(key, NULL)) # fast non-blocking path for the most likely case stored_value else @write_lock.synchronize { super } end end
compute_if_present(key)
click to toggle source
Calls superclass method
# 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)
click to toggle source
Calls superclass method
# 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)
click to toggle source
Calls superclass method
# 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)
click to toggle source
Calls superclass method
# 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)
click to toggle source
Calls superclass method
# 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)
click to toggle source
Calls superclass method
# 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)
click to toggle source
Calls superclass method
# 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