Class: VertxKafkaClient::KafkaConsumerRecords
- Inherits:
-
Object
- Object
- VertxKafkaClient::KafkaConsumerRecords
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-kafka-client/kafka_consumer_records.rb
Overview
Vert.x Kafka consumer records
Instance Method Summary (collapse)
-
- (true, false) empty?
Whether this batch contains any records.
-
- (::VertxKafkaClient::KafkaConsumerRecord) record_at(index = nil)
Get the record at the given index.
-
- (Fixnum) size
The total number of records in this batch.
Instance Method Details
- (true, false) empty?
Returns whether this batch contains any records
27 28 29 30 31 32 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-kafka-client/kafka_consumer_records.rb', line 27 def empty? if !block_given? return @j_del.java_method(:isEmpty, []).call() end raise ArgumentError, "Invalid arguments when calling empty?()" end |
- (::VertxKafkaClient::KafkaConsumerRecord) record_at(index = nil)
Get the record at the given index
36 37 38 39 40 41 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-kafka-client/kafka_consumer_records.rb', line 36 def record_at(index=nil) if index.class == Fixnum && !block_given? return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:recordAt, [Java::int.java_class]).call(index),::VertxKafkaClient::KafkaConsumerRecord, nil, nil) end raise ArgumentError, "Invalid arguments when calling record_at(#{index})" end |
- (Fixnum) size
Returns the total number of records in this batch
20 21 22 23 24 25 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-kafka-client/kafka_consumer_records.rb', line 20 def size if !block_given? return @j_del.java_method(:size, []).call() end raise ArgumentError, "Invalid arguments when calling size()" end |