Class: Aws::KCLrb::V2::V2ToV1Adapter

Inherits:
RecordProcessorBase show all
Defined in:
lib/aws/kclrb/record_processor.rb

Instance Method Summary collapse

Methods inherited from RecordProcessorBase

#version

Constructor Details

#initialize(processor) ⇒ V2ToV1Adapter

Returns a new instance of V2ToV1Adapter.



152
153
154
# File 'lib/aws/kclrb/record_processor.rb', line 152

def initialize(processor)
  @processor = processor
end

Instance Method Details

#init_processor(initialize_input) ⇒ Object



156
157
158
# File 'lib/aws/kclrb/record_processor.rb', line 156

def init_processor(initialize_input)
  @processor.init_processor(initialize_input.shard_id)
end

#lease_lost(lease_lost_input) ⇒ Object



165
166
167
# File 'lib/aws/kclrb/record_processor.rb', line 165

def lease_lost(lease_lost_input)
  @processor.shutdown(nil, 'ZOMBIE')
end

#process_records(process_records_input) ⇒ Object



160
161
162
163
# File 'lib/aws/kclrb/record_processor.rb', line 160

def process_records(process_records_input)
  @processor.process_records(process_records_input.records,
                             process_records_input.checkpointer)
end

#shard_ended(shard_ended_input) ⇒ Object



169
170
171
# File 'lib/aws/kclrb/record_processor.rb', line 169

def shard_ended(shard_ended_input)
  @processor.shutdown(shard_ended_input.checkpointer, 'TERMINATE')
end

#shutdown_requested(shutdown_requested_input) ⇒ Object



173
174
175
# File 'lib/aws/kclrb/record_processor.rb', line 173

def shutdown_requested(shutdown_requested_input)
  @processor.shutdown_requested(shutdown_requested_input.checkpointer)
end