Module: LruRedux::Util::SafeSync
- Includes:
- MonitorMixin
- Included in:
- TTL::ThreadSafeCache, ThreadSafeCache
- Defined in:
- lib/lru_redux/util/safe_sync.rb
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, value) ⇒ Object
- #clear ⇒ Object
- #count ⇒ Object
- #delete(key) ⇒ Object
- #each ⇒ Object
- #evict(key) ⇒ Object
- #fetch(key) ⇒ Object
- #getset(key) ⇒ Object
-
#has_key?(key) ⇒ Boolean
rubocop:disable Naming/PredicateName.
- #ignore_nil=(ignore_nil) ⇒ Object
- #initialize(*args) ⇒ Object
- #key?(key) ⇒ Boolean
- #max_size=(max_size) ⇒ Object
- #to_a ⇒ Object
- #ttl=(ttl) ⇒ Object
- #values ⇒ Object
Instance Method Details
#[](key) ⇒ Object
44 45 46 47 48 |
# File 'lib/lru_redux/util/safe_sync.rb', line 44 def [](key) synchronize do super(key) end end |
#[]=(key, value) ⇒ Object
50 51 52 53 54 |
# File 'lib/lru_redux/util/safe_sync.rb', line 50 def []=(key, value) synchronize do super(key, value) end end |
#clear ⇒ Object
98 99 100 101 102 |
# File 'lib/lru_redux/util/safe_sync.rb', line 98 def clear synchronize do super end end |
#count ⇒ Object
104 105 106 107 108 |
# File 'lib/lru_redux/util/safe_sync.rb', line 104 def count synchronize do super end end |
#delete(key) ⇒ Object
74 75 76 77 78 |
# File 'lib/lru_redux/util/safe_sync.rb', line 74 def delete(key) synchronize do super(key) end end |
#each ⇒ Object
56 57 58 59 60 |
# File 'lib/lru_redux/util/safe_sync.rb', line 56 def each synchronize do super end end |
#evict(key) ⇒ Object
80 81 82 83 84 |
# File 'lib/lru_redux/util/safe_sync.rb', line 80 def evict(key) synchronize do super(key) end end |
#fetch(key) ⇒ Object
38 39 40 41 42 |
# File 'lib/lru_redux/util/safe_sync.rb', line 38 def fetch(key) synchronize do super(key) end end |
#getset(key) ⇒ Object
32 33 34 35 36 |
# File 'lib/lru_redux/util/safe_sync.rb', line 32 def getset(key) synchronize do super(key) end end |
#has_key?(key) ⇒ Boolean
rubocop:disable Naming/PredicateName
92 93 94 95 96 |
# File 'lib/lru_redux/util/safe_sync.rb', line 92 def has_key?(key) # rubocop:disable Naming/PredicateName synchronize do super(key) end end |
#ignore_nil=(ignore_nil) ⇒ Object
26 27 28 29 30 |
# File 'lib/lru_redux/util/safe_sync.rb', line 26 def ignore_nil=(ignore_nil) synchronize do super(ignore_nil) end end |
#initialize(*args) ⇒ Object
10 11 12 |
# File 'lib/lru_redux/util/safe_sync.rb', line 10 def initialize(*args) super(*args) end |
#key?(key) ⇒ Boolean
86 87 88 89 90 |
# File 'lib/lru_redux/util/safe_sync.rb', line 86 def key?(key) synchronize do super(key) end end |
#max_size=(max_size) ⇒ Object
14 15 16 17 18 |
# File 'lib/lru_redux/util/safe_sync.rb', line 14 def max_size=(max_size) synchronize do super(max_size) end end |
#to_a ⇒ Object
62 63 64 65 66 |
# File 'lib/lru_redux/util/safe_sync.rb', line 62 def to_a synchronize do super end end |
#ttl=(ttl) ⇒ Object
20 21 22 23 24 |
# File 'lib/lru_redux/util/safe_sync.rb', line 20 def ttl=(ttl) synchronize do super(ttl) end end |
#values ⇒ Object
68 69 70 71 72 |
# File 'lib/lru_redux/util/safe_sync.rb', line 68 def values synchronize do super end end |