Class: LogStash::PluginMixins::JdbcStreaming::CachePayload

Inherits:
Object
  • Object
show all
Defined in:
lib/logstash/plugin_mixins/jdbc_streaming/cache_payload.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCachePayload

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

#payloadObject (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

Returns:

  • (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

Returns:

  • (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