Class: GroongaDelta::LocalDelta::PackedSchemaTarget
- Inherits:
-
Object
- Object
- GroongaDelta::LocalDelta::PackedSchemaTarget
- Includes:
- ApplyLoggable
- Defined in:
- lib/groonga-delta/local-delta.rb
Instance Attribute Summary collapse
-
#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) ⇒ PackedSchemaTarget
constructor
A new instance of PackedSchemaTarget.
Constructor Details
#initialize(path, timestamp) ⇒ PackedSchemaTarget
Returns a new instance of PackedSchemaTarget.
272 273 274 275 276 |
# File 'lib/groonga-delta/local-delta.rb', line 272 def initialize(path, ) @path = path @timestamp = @targets = [] end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
269 270 271 |
# File 'lib/groonga-delta/local-delta.rb', line 269 def path @path end |
#targets ⇒ Object (readonly)
Returns the value of attribute targets.
271 272 273 |
# File 'lib/groonga-delta/local-delta.rb', line 271 def targets @targets end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
270 271 272 |
# File 'lib/groonga-delta/local-delta.rb', line 270 def @timestamp end |
Instance Method Details
#apply(logger, client, processor) ⇒ Object
278 279 280 281 282 283 284 |
# File 'lib/groonga-delta/local-delta.rb', line 278 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 |