Class: LogStash::Filters::JdbcStreaming
Defined Under Namespace
Classes: CachePayload, NoCache, RowCache
Instance Method Summary
collapse
included, #prepare_jdbc_connection, #setup_jdbc_config
Instance Method Details
#close ⇒ Object
134
135
136
137
138
|
# File 'lib/logstash/filters/jdbc_streaming.rb', line 134
def close
@database.disconnect
rescue => e
logger.warn("Exception caught when attempting to close filter.", :exception => e.message, :backtrace => e.backtrace)
end
|
#filter(event) ⇒ Object
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
# File 'lib/logstash/filters/jdbc_streaming.rb', line 119
def filter(event)
result = cache_lookup(event)
if result.failed?
tag_failure(event)
end
if result.empty?
tag_default(event)
process_event(event, @default_array)
else
process_event(event, result.payload)
end
end
|
#register ⇒ Object
114
115
116
117
|
# File 'lib/logstash/filters/jdbc_streaming.rb', line 114
def register
convert_config_options
prepare_connected_jdbc_cache
end
|