Class: FileWatch::TailMode::Handlers::Base
- Inherits:
-
Object
- Object
- FileWatch::TailMode::Handlers::Base
show all
- Includes:
- LogStash::Util::Loggable
- Defined in:
- lib/filewatch/tail_mode/handlers/base.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(processor, sincedb_collection, observer, settings) ⇒ Base
Returns a new instance of Base.
9
10
11
12
13
14
|
# File 'lib/filewatch/tail_mode/handlers/base.rb', line 9
def initialize(processor, sincedb_collection, observer, settings)
@settings = settings
@processor = processor
@sincedb_collection = sincedb_collection
@observer = observer
end
|
Instance Attribute Details
#sincedb_collection ⇒ Object
Returns the value of attribute sincedb_collection.
7
8
9
|
# File 'lib/filewatch/tail_mode/handlers/base.rb', line 7
def sincedb_collection
@sincedb_collection
end
|
Instance Method Details
#handle(watched_file) ⇒ Object
20
21
22
23
24
25
26
|
# File 'lib/filewatch/tail_mode/handlers/base.rb', line 20
def handle(watched_file)
logger.trace? && logger.trace("handling:", :path => watched_file.path)
unless watched_file.has_listener?
watched_file.set_listener(@observer)
end
handle_specifically(watched_file)
end
|
#handle_specifically(watched_file) ⇒ Object
28
29
30
|
# File 'lib/filewatch/tail_mode/handlers/base.rb', line 28
def handle_specifically(watched_file)
end
|
#quit? ⇒ Boolean
16
17
18
|
# File 'lib/filewatch/tail_mode/handlers/base.rb', line 16
def quit?
@processor.watch.quit?
end
|
#update_existing_specifically(watched_file, sincedb_value) ⇒ Object
32
33
34
|
# File 'lib/filewatch/tail_mode/handlers/base.rb', line 32
def update_existing_specifically(watched_file, sincedb_value)
end
|