Class: LogStash::Filters::JdbcStreaming::CachePayload
- Inherits:
-
Object
- Object
- LogStash::Filters::JdbcStreaming::CachePayload
- Defined in:
- lib/logstash/filters/jdbc_streaming.rb
Instance Attribute Summary collapse
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
Instance Method Summary collapse
- #empty? ⇒ Boolean
- #failed! ⇒ Object
- #failed? ⇒ Boolean
-
#initialize ⇒ CachePayload
constructor
A new instance of CachePayload.
- #push(data) ⇒ Object
Constructor Details
#initialize ⇒ CachePayload
Returns a new instance of CachePayload.
30 31 32 33 |
# File 'lib/logstash/filters/jdbc_streaming.rb', line 30 def initialize @failure = false @payload = [] end |
Instance Attribute Details
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
29 30 31 |
# File 'lib/logstash/filters/jdbc_streaming.rb', line 29 def payload @payload end |
Instance Method Details
#empty? ⇒ Boolean
47 48 49 |
# File 'lib/logstash/filters/jdbc_streaming.rb', line 47 def empty? @payload.empty? end |
#failed! ⇒ Object
39 40 41 |
# File 'lib/logstash/filters/jdbc_streaming.rb', line 39 def failed! @failure = true end |
#failed? ⇒ Boolean
43 44 45 |
# File 'lib/logstash/filters/jdbc_streaming.rb', line 43 def failed? @failure end |
#push(data) ⇒ Object
35 36 37 |
# File 'lib/logstash/filters/jdbc_streaming.rb', line 35 def push(data) @payload << data end |