Class: Bricolage::StreamingLoad::Event
- Inherits:
-
Bricolage::SQSMessage
- Object
- Bricolage::SQSMessage
- Bricolage::StreamingLoad::Event
- Defined in:
- lib/bricolage/streamingload/event.rb
Direct Known Subclasses
CheckPointEvent, DispatchEvent, FlushTableEvent, S3ObjectEvent, ShutdownEvent
Constant Summary
Constants inherited from Bricolage::SQSMessage
Bricolage::SQSMessage::SQS_EVENT_SOURCE
Instance Attribute Summary
Attributes inherited from Bricolage::SQSMessage
#delay_seconds, #message_id, #name, #receipt_handle, #source, #time
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Bricolage::SQSMessage
#body, create, for_sqs_record, for_sqs_result, get_event_time, #initialize, parse_sqs_record
Constructor Details
This class inherits a constructor from Bricolage::SQSMessage
Class Method Details
.get_concrete_class(msg, rec) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/bricolage/streamingload/event.rb', line 9 def Event.get_concrete_class(msg, rec) case when rec['eventName'] == 'shutdown' then ShutdownEvent when rec['eventName'] == 'dispatch' then DispatchEvent when rec['eventName'] == 'flushtable' then FlushTableEvent when rec['eventName'] == 'checkpoint' then CheckPointEvent when !!rec['s3'] then S3ObjectEvent else UnknownSQSMessage end end |
Instance Method Details
#data? ⇒ Boolean
24 25 26 |
# File 'lib/bricolage/streamingload/event.rb', line 24 def data? false end |
#message_type ⇒ Object
20 21 22 |
# File 'lib/bricolage/streamingload/event.rb', line 20 def raise "#{self.class}\#message_type must be implemented" end |