Class: ThriftSourceProtocol::Client
- Inherits:
-
Object
- Object
- ThriftSourceProtocol::Client
- Includes:
- Thrift::Client
- Defined in:
- lib/flume-logger/flume-ng/thrift_source_protocol.rb
Instance Method Summary collapse
- #append(event) ⇒ Object
- #appendBatch(events) ⇒ Object
- #recv_append ⇒ Object
- #recv_appendBatch ⇒ Object
- #send_append(event) ⇒ Object
- #send_appendBatch(events) ⇒ Object
Instance Method Details
#append(event) ⇒ Object
14 15 16 17 |
# File 'lib/flume-logger/flume-ng/thrift_source_protocol.rb', line 14 def append(event) send_append(event) return recv_append() end |
#appendBatch(events) ⇒ Object
29 30 31 32 |
# File 'lib/flume-logger/flume-ng/thrift_source_protocol.rb', line 29 def appendBatch(events) send_appendBatch(events) return recv_appendBatch() end |
#recv_append ⇒ Object
23 24 25 26 27 |
# File 'lib/flume-logger/flume-ng/thrift_source_protocol.rb', line 23 def recv_append() result = (Append_result) return result.success unless result.success.nil? raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'append failed: unknown result') end |
#recv_appendBatch ⇒ Object
38 39 40 41 42 |
# File 'lib/flume-logger/flume-ng/thrift_source_protocol.rb', line 38 def recv_appendBatch() result = (AppendBatch_result) return result.success unless result.success.nil? raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'appendBatch failed: unknown result') end |
#send_append(event) ⇒ Object
19 20 21 |
# File 'lib/flume-logger/flume-ng/thrift_source_protocol.rb', line 19 def send_append(event) ('append', Append_args, :event => event) end |
#send_appendBatch(events) ⇒ Object
34 35 36 |
# File 'lib/flume-logger/flume-ng/thrift_source_protocol.rb', line 34 def send_appendBatch(events) ('appendBatch', AppendBatch_args, :events => events) end |