Class: LogStash::Outputs::Cassandra::SafeSubmitter

Inherits:
Object
  • Object
show all
Defined in:
lib/logstash/outputs/cassandra/safe_submitter.rb

Overview

Responsible for submitting parsed actions to cassandra (with or without a retry mechanism)

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ SafeSubmitter

Returns a new instance of SafeSubmitter.



9
10
11
12
13
# File 'lib/logstash/outputs/cassandra/safe_submitter.rb', line 9

def initialize(options)
  @statement_cache = {}
  @logger = options['logger']
  setup_cassandra_session(options)
end

Instance Method Details

#submit(actions) ⇒ Object



15
16
17
18
# File 'lib/logstash/outputs/cassandra/safe_submitter.rb', line 15

def submit(actions)
  queries = prepare_queries(actions)
  execute_queries_with_retries(queries)
end