Class: LogStash::Filters::JdbcStatic
- Inherits:
-
Base
- Object
- Base
- LogStash::Filters::JdbcStatic
- Defined in:
- lib/logstash/filters/jdbc_static.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.old_validate_value ⇒ Object
132 |
# File 'lib/logstash/filters/jdbc_static.rb', line 132 alias_method :old_validate_value, :validate_value |
.validate_value(value, validator) ⇒ Object
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/logstash/filters/jdbc_static.rb', line 134 def validate_value(value, validator) if validator.is_a?(Array) && validator.first.respond_to?(:find_validation_errors) validation_errors = validator.first.find_validation_errors(value) unless validation_errors.nil? return false, validation_errors end elsif validator.respond_to?(:find_validation_errors) validation_errors = validator.find_validation_errors(value) unless validation_errors.nil? return false, validation_errors end else return old_validate_value(value, validator) end [true, value] end |
Instance Method Details
#close ⇒ Object
164 165 166 167 168 |
# File 'lib/logstash/filters/jdbc_static.rb', line 164 def close @scheduler.stop if @scheduler @parsed_loaders.each(&:close) @processor.close end |
#filter(event) ⇒ Object
159 160 161 162 |
# File 'lib/logstash/filters/jdbc_static.rb', line 159 def filter(event) enhancement_states = @processor.enhance(event) filter_matched(event) if enhancement_states.all? end |
#loader_runner ⇒ Object
170 171 172 173 |
# File 'lib/logstash/filters/jdbc_static.rb', line 170 def loader_runner # use for test verification @loader_runner end |
#register ⇒ Object
154 155 156 157 |
# File 'lib/logstash/filters/jdbc_static.rb', line 154 def register prepare_data_dir prepare_runner end |