Class: LogStash::Filters::JdbcStreaming::CachePayload

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCachePayload

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

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

Returns:

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

Returns:

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