Class: Aws::KCLrb::V2::RecordProcessorBase Abstract
- Inherits:
-
Object
- Object
- Aws::KCLrb::V2::RecordProcessorBase
- Defined in:
- lib/aws/kclrb/record_processor.rb
Overview
Base class for implementing a record processor.
A RecordProcessor
processes a shard in a stream. See the corresponding KCL interface.
Its methods will be called as follows:
- #init_processor will be called once
- #process_records will be called zero or more times
- #lease_lost will be called zero to one time
- #shard_ended will be called zero or more times
- #shutdown_requested will be called zero to one time
Direct Known Subclasses
Instance Method Summary collapse
-
#init_processor(initialize_input) ⇒ Object
abstract
Called once by a KCLProcess before any calls to process_records.
-
#lease_lost(lease_lost_input) ⇒ Object
abstract
Called by a KCLProcess instance to indicate that this record processor should shutdown.
-
#process_records(process_records_input) ⇒ Object
abstract
Called by a KCLProcess with a list of records to be processed and a checkpointer which accepts sequence numbers from the records to indicate where in the stream to checkpoint.
-
#shard_ended(shard_ended_input) ⇒ Object
abstract
Called by a KCLProcess instance to indicate that this record processor should shutdown.
-
#shutdown_requested(shutdown_requested_input) ⇒ Object
abstract
Called by a KCLProcess instance to indicate that this record processor is requesting a shutdown.
- #version ⇒ Object
Instance Method Details
#init_processor(initialize_input) ⇒ Object
Called once by a KCLProcess before any calls to process_records.
98 99 100 |
# File 'lib/aws/kclrb/record_processor.rb', line 98 def init_processor(initialize_input) fail NotImplementedError.new end |
#lease_lost(lease_lost_input) ⇒ Object
Called by a KCLProcess instance to indicate that this record processor should shutdown. After this is called, there will be no more calls to any other methods of this record processor.
122 123 124 |
# File 'lib/aws/kclrb/record_processor.rb', line 122 def lease_lost(lease_lost_input) fail NotImplementedError.new end |
#process_records(process_records_input) ⇒ Object
Called by a KCLProcess with a list of records to be processed and a checkpointer which accepts sequence numbers from the records to indicate where in the stream to checkpoint.
109 110 111 |
# File 'lib/aws/kclrb/record_processor.rb', line 109 def process_records(process_records_input) fail NotImplementedError.new end |
#shard_ended(shard_ended_input) ⇒ Object
Called by a KCLProcess instance to indicate that this record processor should shutdown. After this is called, there will be no more calls to any other methods of this record processor.
134 135 136 |
# File 'lib/aws/kclrb/record_processor.rb', line 134 def shard_ended(shard_ended_input) fail NotImplementedError.new end |
#shutdown_requested(shutdown_requested_input) ⇒ Object
Called by a KCLProcess instance to indicate that this record processor is requesting a shutdown. This method should be overriden if required.
143 144 |
# File 'lib/aws/kclrb/record_processor.rb', line 143 def shutdown_requested(shutdown_requested_input) end |
#version ⇒ Object
146 147 148 |
# File 'lib/aws/kclrb/record_processor.rb', line 146 def version 2 end |