Class: ThreadSafe::SynchronizedCacheBackend

### Home Classes Methods

### In Files

- lib/thread_safe/synchronized_cache_backend.rb

### Parent

ThreadSafe::NonConcurrentCacheBackend

### Methods

- #[]
- #[]=
- #clear
- #compute
- #compute_if_absent
- #compute_if_present
- #delete
- #delete_pair
- #get_and_set
- #get_or_default
- #key?
- #merge_pair
- #replace_if_exists
- #replace_pair
- #size
- #value?

### Included Modules

- Mutex_m

### Class/Module Index

Quicksearch

- ThreadSafe
- ThreadSafe::Array
- ThreadSafe::AtomicReferenceCacheBackend
- ThreadSafe::AtomicReferenceCacheBackend::Node
- ThreadSafe::AtomicReferenceCacheBackend::Table
- ThreadSafe::Cache
- ThreadSafe::Hash
- ThreadSafe::MriCacheBackend
- ThreadSafe::NonConcurrentCacheBackend
- ThreadSafe::SynchronizedCacheBackend
- ThreadSafe::Util
- ThreadSafe::Util::Adder
- ThreadSafe::Util::CheapLockable
- ThreadSafe::Util::PowerOfTwoTuple
- ThreadSafe::Util::Striped64
- ThreadSafe::Util::Striped64::Cell
- ThreadSafe::Util::Volatile
- ThreadSafe::Util::VolatileTuple
- SynchronizedDelegator
- Threadsafe

No matching classes.

# ThreadSafe::SynchronizedCacheBackend

### Public Instance Methods

[](key) click to toggle source

WARNING: Mutex_m is a non-reentrant lock, so the synchronized methods are not allowed to call each other.

    # File lib/thread_safe/synchronized_cache_backend.rb, line 8
    def [](key)
      synchronize { super }
    end

[]=(key, value) click to toggle source

    # File lib/thread_safe/synchronized_cache_backend.rb, line 12
    def []=(key, value)
      synchronize { super }
    end

clear() click to toggle source

    # File lib/thread_safe/synchronized_cache_backend.rb, line 60
    def clear
      synchronize { super }
    end

compute(key) click to toggle source

    # File lib/thread_safe/synchronized_cache_backend.rb, line 24
    def compute(key)
      synchronize { super }
    end

compute_if_absent(key) click to toggle source

    # File lib/thread_safe/synchronized_cache_backend.rb, line 16
    def compute_if_absent(key)
      synchronize { super }
    end

compute_if_present(key) click to toggle source

    # File lib/thread_safe/synchronized_cache_backend.rb, line 20
    def compute_if_present(key)
      synchronize { super }
    end

delete(key) click to toggle source

    # File lib/thread_safe/synchronized_cache_backend.rb, line 52
    def delete(key)
      synchronize { super }
    end

delete_pair(key, value) click to toggle source

    # File lib/thread_safe/synchronized_cache_backend.rb, line 56
    def delete_pair(key, value)
      synchronize { super }
    end

get_and_set(key, value) click to toggle source

    # 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) click to toggle source

    # File lib/thread_safe/synchronized_cache_backend.rb, line 68
    def get_or_default(key, default_value)
      synchronize { super }
    end

key?(key) click to toggle source

    # File lib/thread_safe/synchronized_cache_backend.rb, line 44
    def key?(key)
      synchronize { super }
    end

merge_pair(key, value) click to toggle source

    # File lib/thread_safe/synchronized_cache_backend.rb, line 28
    def merge_pair(key, value)
      synchronize { super }
    end

replace_if_exists(key, new_value) click to toggle source

    # 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) click to toggle source

    # File lib/thread_safe/synchronized_cache_backend.rb, line 32
    def replace_pair(key, old_value, new_value)
      synchronize { super }
    end

size() click to toggle source

    # File lib/thread_safe/synchronized_cache_backend.rb, line 64
    def size
      synchronize { super }
    end

value?(value) click to toggle source

    # File lib/thread_safe/synchronized_cache_backend.rb, line 48
    def value?(value)
      synchronize { super }
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.