Class: GroongaDelta::LocalReader::SchemaTarget
- Inherits:
-
Object
- Object
- GroongaDelta::LocalReader::SchemaTarget
- Includes:
- Loggable
- Defined in:
- lib/groonga-delta/local-reader.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Instance Method Summary collapse
- #apply(logger, client, processor) ⇒ Object
-
#initialize(path, timestamp) ⇒ SchemaTarget
constructor
A new instance of SchemaTarget.
- #vacuum(logger) ⇒ Object
Constructor Details
#initialize(path, timestamp) ⇒ SchemaTarget
Returns a new instance of SchemaTarget.
238 239 240 241 |
# File 'lib/groonga-delta/local-reader.rb', line 238 def initialize(path, ) @path = path @timestamp = end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
236 237 238 |
# File 'lib/groonga-delta/local-reader.rb', line 236 def path @path end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
237 238 239 |
# File 'lib/groonga-delta/local-reader.rb', line 237 def @timestamp end |
Instance Method Details
#apply(logger, client, processor) ⇒ Object
243 244 245 246 247 |
# File 'lib/groonga-delta/local-reader.rb', line 243 def apply(logger, client, processor) apply_log(logger, @path) do processor.load(@path) end end |
#vacuum(logger) ⇒ Object
249 250 251 252 253 |
# File 'lib/groonga-delta/local-reader.rb', line 249 def vacuum(logger) vacuum_log(logger, @path) do FileUtils.rm(@path) end end |