Class List Method List File List

# Class: VertxKafkaClient::KafkaConsumerRecord

Inherits:
  Object
  - Object
  - VertxKafkaClient::KafkaConsumerRecord
  show all
Defined in:
  /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-kafka-client/kafka_consumer_record.rb

## Overview

Vert.x Kafka consumer record

## Instance Method Summary (collapse)

- - (Fixnum) checksum
  The checksum (CRC32) of the record.
- - (Array<::VertxKafkaClient::KafkaHeader>) headers
  The list of consumer record headers.
- - (Object) key
  The key (or null if no key is specified).
- - (Fixnum) offset
  The position of this record in the corresponding Kafka partition.
- - (Fixnum) partition
  The partition from which this record is received.
- - (Fixnum) timestamp
  The timestamp of this record.
- - (:NO_TIMESTAMP_TYPE, ...) timestamp_type
  The timestamp type of this record.
- - (String) topic
  The topic this record is received from.
- - (Object) value
  The value.

## Instance Method Details

### - (`Fixnum`) checksum

Returns the checksum (CRC32) of the record.

Returns:

- (`Fixnum`) —
  the checksum (CRC32) of the record.

Raises:

- (`ArgumentError`)

    55
    56
    57
    58
    59
    60
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-kafka-client/kafka_consumer_record.rb', line 55

    def checksum
      if !block_given?
        return @j_del.java_method(:checksum, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling checksum()"
    end

### - (`Array<::VertxKafkaClient::KafkaHeader>`) headers

Returns the list of consumer record headers

Returns:

- (`Array<::VertxKafkaClient::KafkaHeader>`) —
  the list of consumer record headers

Raises:

- (`ArgumentError`)

    76
    77
    78
    79
    80
    81
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-kafka-client/kafka_consumer_record.rb', line 76

    def headers
      if !block_given?
        return @j_del.java_method(:headers, []).call().to_a.map { |elt| ::Vertx::Util::Utils.safe_create(elt,::VertxKafkaClient::KafkaHeader) }
      end
      raise ArgumentError, "Invalid arguments when calling headers()"
    end

### - (`Object`) key

Returns the key (or null if no key is specified)

Returns:

- (`Object`) —
  the key (or null if no key is specified)

Raises:

- (`ArgumentError`)

    62
    63
    64
    65
    66
    67
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-kafka-client/kafka_consumer_record.rb', line 62

    def key
      if !block_given?
        return @j_arg_K.wrap(@j_del.java_method(:key, []).call())
      end
      raise ArgumentError, "Invalid arguments when calling key()"
    end

### - (`Fixnum`) offset

Returns the position of this record in the corresponding Kafka partition.

Returns:

- (`Fixnum`) —
  the position of this record in the corresponding Kafka partition.

Raises:

- (`ArgumentError`)

    34
    35
    36
    37
    38
    39
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-kafka-client/kafka_consumer_record.rb', line 34

    def offset
      if !block_given?
        return @j_del.java_method(:offset, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling offset()"
    end

### - (`Fixnum`) partition

Returns the partition from which this record is received

Returns:

- (`Fixnum`) —
  the partition from which this record is received

Raises:

- (`ArgumentError`)

    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_record.rb', line 27

    def partition
      if !block_given?
        return @j_del.java_method(:partition, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling partition()"
    end

### - (`Fixnum`) timestamp

Returns the timestamp of this record

Returns:

- (`Fixnum`) —
  the timestamp of this record

Raises:

- (`ArgumentError`)

    41
    42
    43
    44
    45
    46
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-kafka-client/kafka_consumer_record.rb', line 41

    def timestamp
      if !block_given?
        return @j_del.java_method(:timestamp, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling timestamp()"
    end

### - (`:NO_TIMESTAMP_TYPE`, ...) timestamp_type

Returns the timestamp type of this record

Returns:

- (`:NO_TIMESTAMP_TYPE`, `:CREATE_TIME`, `:LOG_APPEND_TIME`) —
  the timestamp type of this record

Raises:

- (`ArgumentError`)

    48
    49
    50
    51
    52
    53
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-kafka-client/kafka_consumer_record.rb', line 48

    def timestamp_type
      if !block_given?
        return @j_del.java_method(:timestampType, []).call().name.intern
      end
      raise ArgumentError, "Invalid arguments when calling timestamp_type()"
    end

### - (`String`) topic

Returns the topic this record is received from

Returns:

- (`String`) —
  the topic this record is received from

Raises:

- (`ArgumentError`)

    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_record.rb', line 20

    def topic
      if !block_given?
        return @j_del.java_method(:topic, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling topic()"
    end

### - (`Object`) value

Returns the value

Returns:

- (`Object`) —
  the value

Raises:

- (`ArgumentError`)

    69
    70
    71
    72
    73
    74
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-kafka-client/kafka_consumer_record.rb', line 69

    def value
      if !block_given?
        return @j_arg_V.wrap(@j_del.java_method(:value, []).call())
      end
      raise ArgumentError, "Invalid arguments when calling value()"
    end