Class: Fluent::RedisMultiTypeCounterOutput::RecordKey
- Inherits:
-
Object
- Object
- Fluent::RedisMultiTypeCounterOutput::RecordKey
- Defined in:
- lib/fluent/plugin/out_redis_multi_type_counter.rb
Instance Attribute Summary collapse
-
#count_hash_key ⇒ Object
readonly
Returns the value of attribute count_hash_key.
-
#count_key ⇒ Object
readonly
Returns the value of attribute count_key.
-
#count_zset_key ⇒ Object
readonly
Returns the value of attribute count_zset_key.
-
#store_list ⇒ Object
readonly
Returns the value of attribute store_list.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(count_key, count_hash_key, count_zset_key, store_list) ⇒ RecordKey
constructor
A new instance of RecordKey.
Constructor Details
#initialize(count_key, count_hash_key, count_zset_key, store_list) ⇒ RecordKey
Returns a new instance of RecordKey.
105 106 107 108 109 110 |
# File 'lib/fluent/plugin/out_redis_multi_type_counter.rb', line 105 def initialize(count_key, count_hash_key, count_zset_key, store_list) @count_key = count_key @count_hash_key = count_hash_key @count_zset_key = count_zset_key @store_list = store_list end |
Instance Attribute Details
#count_hash_key ⇒ Object (readonly)
Returns the value of attribute count_hash_key.
103 104 105 |
# File 'lib/fluent/plugin/out_redis_multi_type_counter.rb', line 103 def count_hash_key @count_hash_key end |
#count_key ⇒ Object (readonly)
Returns the value of attribute count_key.
103 104 105 |
# File 'lib/fluent/plugin/out_redis_multi_type_counter.rb', line 103 def count_key @count_key end |
#count_zset_key ⇒ Object (readonly)
Returns the value of attribute count_zset_key.
103 104 105 |
# File 'lib/fluent/plugin/out_redis_multi_type_counter.rb', line 103 def count_zset_key @count_zset_key end |
#store_list ⇒ Object (readonly)
Returns the value of attribute store_list.
103 104 105 |
# File 'lib/fluent/plugin/out_redis_multi_type_counter.rb', line 103 def store_list @store_list end |
Instance Method Details
#eql?(other) ⇒ Boolean
125 126 127 128 |
# File 'lib/fluent/plugin/out_redis_multi_type_counter.rb', line 125 def eql?(other) return @count_key.eql?(other.count_key) && @count_hash_key.eql?(other.count_hash_key) && @count_zset_key.eql?(other.count_zset_key) end |
#hash ⇒ Object
112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/fluent/plugin/out_redis_multi_type_counter.rb', line 112 def hash hash_key = "" keys = [@count_key, @count_hash_key, @count_zset_key] keys.select { |key| key != nil }.each { |key| hash_key += ("@@@@" + key) } hash_key.hash end |