Class: ConvenientService::Support::Cache::Entities::Caches::ThreadSafeHash Private

Inherits:
Hash
  • Object
show all
Defined in:
lib/convenient_service/support/cache/entities/caches/thread_safe_hash.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

Instance Attribute Summary

Attributes inherited from Base

#default, #key, #parent, #store

Instance Method Summary collapse

Methods inherited from Base

#==, #[], #[]=, #get, keygen, #keygen, #set

Methods included from AbstractMethod

abstract_method

Methods included from ConvenientService::Support::Concern

included

Constructor Details

#initializevoid

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0



17
18
19
20
21
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_hash.rb', line 17

def initialize(...)
  super

  @lock = ::Mutex.new
end

Instance Method Details

#backendSymbol

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Symbol)

Since:

  • 1.0.0



26
27
28
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_hash.rb', line 26

def backend
  Constants::Backends::THREAD_SAFE_HASH
end

#clearConvenientService::Support::Cache::Entities::Caches::Array

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



75
76
77
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_hash.rb', line 75

def clear(...)
  @lock.synchronize { super }
end

#default=Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns Can be any type.

Returns:

  • (Object)

    Can be any type.

Since:

  • 1.0.0



96
97
98
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_hash.rb', line 96

def default=(...)
  @lock.synchronize { super }
end

#deleteObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns Can be any type.

Returns:

  • (Object)

    Can be any type.

Since:

  • 1.0.0



68
69
70
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_hash.rb', line 68

def delete(...)
  @lock.synchronize { super }
end

#empty?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)

Since:

  • 1.0.0



33
34
35
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_hash.rb', line 33

def empty?(...)
  @lock.synchronize { super }
end

#exist?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)

Since:

  • 1.0.0



40
41
42
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_hash.rb', line 40

def exist?(...)
  @lock.synchronize { super }
end

#fetchObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns Can be any type.

Returns:

  • (Object)

    Can be any type.

Since:

  • 1.0.0



61
62
63
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_hash.rb', line 61

def fetch(...)
  @lock.synchronize { super }
end

#readObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns Can be any type.

Returns:

  • (Object)

    Can be any type.

Since:

  • 1.0.0



47
48
49
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_hash.rb', line 47

def read(...)
  @lock.synchronize { super }
end

#scopeConvenientService::Support::Cache::Entities::Caches::Array

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



82
83
84
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_hash.rb', line 82

def scope(...)
  @lock.synchronize { super }
end

#scope!ConvenientService::Support::Cache::Entities::Caches::Array

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



89
90
91
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_hash.rb', line 89

def scope!(...)
  @lock.synchronize { super }
end

#writeObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns Can be any type.

Returns:

  • (Object)

    Can be any type.

Since:

  • 1.0.0



54
55
56
# File 'lib/convenient_service/support/cache/entities/caches/thread_safe_hash.rb', line 54

def write(...)
  @lock.synchronize { super }
end