Class: GroongaDelta::LocalDelta::PackedTableTarget
- Inherits:
-
Object
- Object
- GroongaDelta::LocalDelta::PackedTableTarget
- Includes:
- ApplyLoggable
- Defined in:
- lib/groonga-delta/local-delta.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#targets ⇒ Object
readonly
Returns the value of attribute targets.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Instance Method Summary collapse
- #apply(logger, client, processor) ⇒ Object
-
#initialize(path, timestamp, name) ⇒ PackedTableTarget
constructor
A new instance of PackedTableTarget.
Constructor Details
#initialize(path, timestamp, name) ⇒ PackedTableTarget
Returns a new instance of PackedTableTarget.
325 326 327 328 329 330 |
# File 'lib/groonga-delta/local-delta.rb', line 325 def initialize(path, , name) @path = path @timestamp = @name = name @targets = [] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
323 324 325 |
# File 'lib/groonga-delta/local-delta.rb', line 323 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
321 322 323 |
# File 'lib/groonga-delta/local-delta.rb', line 321 def path @path end |
#targets ⇒ Object (readonly)
Returns the value of attribute targets.
324 325 326 |
# File 'lib/groonga-delta/local-delta.rb', line 324 def targets @targets end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
322 323 324 |
# File 'lib/groonga-delta/local-delta.rb', line 322 def @timestamp end |
Instance Method Details
#apply(logger, client, processor) ⇒ Object
332 333 334 335 336 337 338 |
# File 'lib/groonga-delta/local-delta.rb', line 332 def apply(logger, client, processor) apply_log(logger, @path) do @targets.sort_by(&:timestamp).each do |target| target.apply(logger, client, processor) end end end |