Class: ConvenientService::Support::Cache::Entities::Caches::ThreadSafeArray
- Defined in:
- lib/convenient_service/support/cache/entities/caches/thread_safe_array.rb
Instance Attribute Summary
Attributes inherited from Base
#default, #key, #parent, #store
Instance Method Summary collapse
- #backend ⇒ Symbol
- #clear ⇒ ConvenientService::Support::Cache::Entities::Caches::Array
-
#default= ⇒ Object
Can be any type.
-
#delete ⇒ Object
Can be any type.
- #empty? ⇒ Boolean
- #exist? ⇒ Boolean
-
#fetch ⇒ Object
Can be any type.
- #initialize ⇒ void constructor
-
#read ⇒ Object
Can be any type.
- #scope ⇒ ConvenientService::Support::Cache::Entities::Caches::Array
- #scope! ⇒ ConvenientService::Support::Cache::Entities::Caches::Array
-
#write ⇒ Object
Can be any type.
Methods inherited from Base
#==, #[], #[]=, #get, keygen, #keygen, #set
Methods included from AbstractMethod
Constructor Details
#initialize ⇒ void
17 18 19 20 21 |
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_array.rb', line 17 def initialize(...) super @lock = ::Mutex.new end |
Instance Method Details
#backend ⇒ Symbol
26 27 28 |
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_array.rb', line 26 def backend Constants::Backends::THREAD_SAFE_ARRAY end |
#clear ⇒ ConvenientService::Support::Cache::Entities::Caches::Array
75 76 77 |
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_array.rb', line 75 def clear(...) @lock.synchronize { super } end |
#default= ⇒ Object
Returns Can be any type.
96 97 98 |
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_array.rb', line 96 def default=(...) @lock.synchronize { super } end |
#delete ⇒ Object
Returns Can be any type.
68 69 70 |
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_array.rb', line 68 def delete(...) @lock.synchronize { super } end |
#empty? ⇒ Boolean
33 34 35 |
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_array.rb', line 33 def empty?(...) @lock.synchronize { super } end |
#exist? ⇒ Boolean
40 41 42 |
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_array.rb', line 40 def exist?(...) @lock.synchronize { super } end |
#fetch ⇒ Object
Returns Can be any type.
61 62 63 |
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_array.rb', line 61 def fetch(...) @lock.synchronize { super } end |
#read ⇒ Object
Returns Can be any type.
47 48 49 |
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_array.rb', line 47 def read(...) @lock.synchronize { super } end |
#scope ⇒ ConvenientService::Support::Cache::Entities::Caches::Array
82 83 84 |
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_array.rb', line 82 def scope(...) @lock.synchronize { super } end |
#scope! ⇒ ConvenientService::Support::Cache::Entities::Caches::Array
89 90 91 |
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_array.rb', line 89 def scope!(...) @lock.synchronize { super } end |
#write ⇒ Object
Returns Can be any type.
54 55 56 |
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_array.rb', line 54 def write(...) @lock.synchronize { super } end |