Class: LogStash::Outputs::CassandraOutput

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

Instance Method Summary collapse

Instance Method Details

#closeObject



135
136
137
# File 'lib/logstash/outputs/cassandra.rb', line 135

def close
  @buffer.stop
end

#flushObject



139
140
141
# File 'lib/logstash/outputs/cassandra.rb', line 139

def flush
  @buffer.flush
end

#multi_receive(events) ⇒ Object



125
126
127
128
129
# File 'lib/logstash/outputs/cassandra.rb', line 125

def multi_receive(events)
  events.each_slice(@flush_size) do |slice|
    @safe_submitter.submit(slice.map {|event| @event_parser.parse(event) })
  end
end

#receive(event) ⇒ Object



121
122
123
# File 'lib/logstash/outputs/cassandra.rb', line 121

def receive(event)
  @buffer << @event_parser.parse(event)
end

#registerObject



115
116
117
118
119
# File 'lib/logstash/outputs/cassandra.rb', line 115

def register
  setup_event_parser
  setup_safe_submitter
  setup_buffer_and_handler
end

#teardownObject



131
132
133
# File 'lib/logstash/outputs/cassandra.rb', line 131

def teardown
  close
end