Class: GroongaDelta::LocalDelta::PackedSchemaTarget

Inherits:
Object
  • Object
show all
Includes:
ApplyLoggable
Defined in:
lib/groonga-delta/local-delta.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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, timestamp)
  @path = path
  @timestamp = timestamp
  @targets = []
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



269
270
271
# File 'lib/groonga-delta/local-delta.rb', line 269

def path
  @path
end

#targetsObject (readonly)

Returns the value of attribute targets.



271
272
273
# File 'lib/groonga-delta/local-delta.rb', line 271

def targets
  @targets
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



270
271
272
# File 'lib/groonga-delta/local-delta.rb', line 270

def timestamp
  @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