Class: LogStash::Filters::Jdbc::LookupResult
- Inherits:
-
Object
- Object
- LogStash::Filters::Jdbc::LookupResult
- Defined in:
- lib/logstash/filters/jdbc/lookup_result.rb
Instance Attribute Summary collapse
-
#invalid_parameters ⇒ Object
readonly
Returns the value of attribute invalid_parameters.
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
Instance Method Summary collapse
- #empty? ⇒ Boolean
- #failed! ⇒ Object
- #failed? ⇒ Boolean
-
#initialize ⇒ LookupResult
constructor
A new instance of LookupResult.
- #invalid_parameters_push(data) ⇒ Object
- #parameters_invalid? ⇒ Boolean
- #push(data) ⇒ Object
- #valid? ⇒ Boolean
Constructor Details
#initialize ⇒ LookupResult
Returns a new instance of LookupResult.
6 7 8 9 10 |
# File 'lib/logstash/filters/jdbc/lookup_result.rb', line 6 def initialize @failure = false @payload = [] @invalid_parameters = [] end |
Instance Attribute Details
#invalid_parameters ⇒ Object (readonly)
Returns the value of attribute invalid_parameters.
4 5 6 |
# File 'lib/logstash/filters/jdbc/lookup_result.rb', line 4 def invalid_parameters @invalid_parameters end |
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
4 5 6 |
# File 'lib/logstash/filters/jdbc/lookup_result.rb', line 4 def payload @payload end |
Instance Method Details
#empty? ⇒ Boolean
36 37 38 |
# File 'lib/logstash/filters/jdbc/lookup_result.rb', line 36 def empty? @payload.empty? end |
#failed! ⇒ Object
20 21 22 |
# File 'lib/logstash/filters/jdbc/lookup_result.rb', line 20 def failed! @failure = true end |
#failed? ⇒ Boolean
28 29 30 |
# File 'lib/logstash/filters/jdbc/lookup_result.rb', line 28 def failed? @failure end |
#invalid_parameters_push(data) ⇒ Object
16 17 18 |
# File 'lib/logstash/filters/jdbc/lookup_result.rb', line 16 def invalid_parameters_push(data) @invalid_parameters << data end |
#parameters_invalid? ⇒ Boolean
32 33 34 |
# File 'lib/logstash/filters/jdbc/lookup_result.rb', line 32 def parameters_invalid? !@invalid_parameters.empty? end |
#push(data) ⇒ Object
12 13 14 |
# File 'lib/logstash/filters/jdbc/lookup_result.rb', line 12 def push(data) @payload << data end |
#valid? ⇒ Boolean
24 25 26 |
# File 'lib/logstash/filters/jdbc/lookup_result.rb', line 24 def valid? !failed? && @invalid_parameters.empty? end |