Class: LogStash::PluginMixins::JdbcStreaming::CachePayload
- Inherits:
-
Object
- Object
- LogStash::PluginMixins::JdbcStreaming::CachePayload
- Defined in:
- lib/logstash/plugin_mixins/jdbc_streaming/cache_payload.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.
7 8 9 10 |
# File 'lib/logstash/plugin_mixins/jdbc_streaming/cache_payload.rb', line 7 def initialize @failure = false @payload = [] end |
Instance Attribute Details
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
5 6 7 |
# File 'lib/logstash/plugin_mixins/jdbc_streaming/cache_payload.rb', line 5 def payload @payload end |
Instance Method Details
#empty? ⇒ Boolean
24 25 26 |
# File 'lib/logstash/plugin_mixins/jdbc_streaming/cache_payload.rb', line 24 def empty? @payload.empty? end |
#failed! ⇒ Object
16 17 18 |
# File 'lib/logstash/plugin_mixins/jdbc_streaming/cache_payload.rb', line 16 def failed! @failure = true end |
#failed? ⇒ Boolean
20 21 22 |
# File 'lib/logstash/plugin_mixins/jdbc_streaming/cache_payload.rb', line 20 def failed? @failure end |
#push(data) ⇒ Object
12 13 14 |
# File 'lib/logstash/plugin_mixins/jdbc_streaming/cache_payload.rb', line 12 def push(data) @payload << data end |