Class: GroongaDelta::LocalDelta::PackedTableTarget

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

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



323
324
325
# File 'lib/groonga-delta/local-delta.rb', line 323

def name
  @name
end

#pathObject (readonly)

Returns the value of attribute path.



321
322
323
# File 'lib/groonga-delta/local-delta.rb', line 321

def path
  @path
end

#targetsObject (readonly)

Returns the value of attribute targets.



324
325
326
# File 'lib/groonga-delta/local-delta.rb', line 324

def targets
  @targets
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



322
323
324
# File 'lib/groonga-delta/local-delta.rb', line 322

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