Class: ConvenientService::Support::Cache::Entities::Caches::ThreadSafeArray
- Defined in:
- lib/convenient_service/support/cache/entities/caches/thread_safe_array.rb
Instance Method Summary collapse
- #clear ⇒ ConvenientService::Support::Cache::Entities::Caches::Array
-
#delete ⇒ Object
Can be any type.
- #empty? ⇒ Boolean
- #exist? ⇒ Boolean
-
#fetch ⇒ Object
Can be any type.
- #initialize(array = []) ⇒ void constructor
-
#read ⇒ Object
Can be any type.
-
#write ⇒ Object
Can be any type.
Methods inherited from Array
Methods inherited from Base
#==, #[], #[]=, #keygen, keygen, #scope
Methods included from ConvenientService::Support::Concern
Constructor Details
#initialize(array = []) ⇒ void
14 15 16 17 18 |
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_array.rb', line 14 def initialize(array = []) super @lock = ::Mutex.new end |
Instance Method Details
#clear ⇒ ConvenientService::Support::Cache::Entities::Caches::Array
65 66 67 |
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_array.rb', line 65 def clear(...) @lock.synchronize { super } end |
#delete ⇒ Object
Returns Can be any type.
58 59 60 |
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_array.rb', line 58 def delete(...) @lock.synchronize { super } end |
#empty? ⇒ Boolean
23 24 25 |
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_array.rb', line 23 def empty?(...) @lock.synchronize { super } end |
#exist? ⇒ Boolean
30 31 32 |
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_array.rb', line 30 def exist?(...) @lock.synchronize { super } end |
#fetch ⇒ Object
Returns Can be any type.
51 52 53 |
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_array.rb', line 51 def fetch(...) @lock.synchronize { super } end |
#read ⇒ Object
Returns Can be any type.
37 38 39 |
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_array.rb', line 37 def read(...) @lock.synchronize { super } end |
#write ⇒ Object
Returns Can be any type.
44 45 46 |
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_array.rb', line 44 def write(...) @lock.synchronize { super } end |