Class List Method List File List

# Class: VertxKafkaClient::KafkaConsumerRecord

Inherits:
  Object
  - Object
  - VertxKafkaClient::KafkaConsumerRecord
  show all
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/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.
- - (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`)

    54
    55
    56
    57
    58
    59
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-kafka-client/kafka_consumer_record.rb', line 54

    def checksum
      if !block_given?
        return @j_del.java_method(:checksum, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling checksum()"
    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`)

    61
    62
    63
    64
    65
    66
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-kafka-client/kafka_consumer_record.rb', line 61

    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`)

    33
    34
    35
    36
    37
    38
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-kafka-client/kafka_consumer_record.rb', line 33

    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`)

    26
    27
    28
    29
    30
    31
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-kafka-client/kafka_consumer_record.rb', line 26

    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`)

    40
    41
    42
    43
    44
    45
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-kafka-client/kafka_consumer_record.rb', line 40

    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`)

    47
    48
    49
    50
    51
    52
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-kafka-client/kafka_consumer_record.rb', line 47

    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`)

    19
    20
    21
    22
    23
    24
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-kafka-client/kafka_consumer_record.rb', line 19

    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`)

    68
    69
    70
    71
    72
    73
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-kafka-client/kafka_consumer_record.rb', line 68

    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