Class: Aws::KCLrb::KCLProcess
- Inherits:
-
Object
- Object
- Aws::KCLrb::KCLProcess
- Defined in:
- lib/aws/kclrb/kcl_process.rb
Overview
Entry point for a KCL application in Ruby.
Implementers of KCL applications in Ruby should instantiate this class and invoke the #run method to start processing records.
Instance Method Summary collapse
-
#initialize(processor, input = $stdin, output = $stdout, error = $stderr) ⇒ KCLProcess
constructor
A new instance of KCLProcess.
-
#run ⇒ Object
Starts this KCL processor's main loop.
Constructor Details
#initialize(processor, input = $stdin, output = $stdout, error = $stderr) ⇒ KCLProcess
Returns a new instance of KCLProcess.
27 28 29 30 31 32 33 34 35 |
# File 'lib/aws/kclrb/kcl_process.rb', line 27 def initialize(processor, input = $stdin, output = $stdout, error = $stderr) if processor.version == 1 @processor = Aws::KCLrb::V2::V2ToV1Adapter.new(processor) else @processor = processor end @io_proxy = IOProxy.new(input, output, error) @checkpointer = CheckpointerImpl.new(@io_proxy) end |
Instance Method Details
#run ⇒ Object
Starts this KCL processor's main loop.
38 39 40 41 42 43 44 |
# File 'lib/aws/kclrb/kcl_process.rb', line 38 def run action = @io_proxy.read_action while action do process_action(action) action = @io_proxy.read_action end end |