Class: Switchman::ShardAwareStatementCache
- Inherits:
-
Object
- Object
- Switchman::ShardAwareStatementCache
- Defined in:
- lib/switchman/shard_aware_statement_cache.rb
Instance Attribute Summary collapse
-
#__cache ⇒ Object
writeonly
Sets the attribute __cache.
-
#shard_category ⇒ Object
writeonly
Sets the attribute shard_category.
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, value) ⇒ Object
-
#initialize(shard_category) ⇒ ShardAwareStatementCache
constructor
A new instance of ShardAwareStatementCache.
Constructor Details
#initialize(shard_category) ⇒ ShardAwareStatementCache
Returns a new instance of ShardAwareStatementCache.
7 8 9 10 11 |
# File 'lib/switchman/shard_aware_statement_cache.rb', line 7 def initialize(shard_category) self.extend Mutex_m self.__cache = {} self.shard_category = shard_category end |
Instance Attribute Details
#__cache=(value) ⇒ Object
Sets the attribute __cache
4 5 6 |
# File 'lib/switchman/shard_aware_statement_cache.rb', line 4 def __cache=(value) @__cache = value end |
#shard_category=(value) ⇒ Object
Sets the attribute shard_category
4 5 6 |
# File 'lib/switchman/shard_aware_statement_cache.rb', line 4 def shard_category=(value) @shard_category = value end |