Class List Method List File List

# Class: VertxKafkaClient::KafkaProducerRecord

Inherits:
  Object
  - Object
  - VertxKafkaClient::KafkaProducerRecord
  show all
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-kafka-client/kafka_producer_record.rb

## Overview

Vert.x Kafka producer record.

## Class Method Summary (collapse)

- + (::VertxKafkaClient::KafkaProducerRecord) create(param_1 = nil, param_2 = nil, param_3 = nil, param_4 = nil, param_5 = nil)
  Create a concrete instance of a Vert.x producer record.

## Instance Method Summary (collapse)

- - (Object) key
  The key (or null if no key is specified).
- - (Fixnum) partition
  The partition to which the record will be sent (or null if no partition was specified).
- - (Fixnum) timestamp
  The timestamp of this record.
- - (String) topic
  The topic this record is being sent to.
- - (Object) value
  The value.

## Class Method Details

### + (`::VertxKafkaClient::KafkaProducerRecord`) create(topic, value) + (`::VertxKafkaClient::KafkaProducerRecord`) create(topic, key, value) + (`::VertxKafkaClient::KafkaProducerRecord`) create(topic, key, value, timestamp, partition)

Create a concrete instance of a Vert.x producer record

Overloads:

- + (`::VertxKafkaClient::KafkaProducerRecord`) create(topic, value)

  Parameters:

  - topic (`String`) —
    the topic this record is being sent to
  - value (`Object`) —
    the value
- + (`::VertxKafkaClient::KafkaProducerRecord`) create(topic, key, value)

  Parameters:

  - topic (`String`) —
    the topic this record is being sent to
  - key (`Object`) —
    the key (or null if no key is specified)
  - value (`Object`) —
    the value
- + (`::VertxKafkaClient::KafkaProducerRecord`) create(topic, key, value, timestamp, partition)

  Parameters:

  - topic (`String`) —
    the topic this record is being sent to
  - key (`Object`) —
    the key (or null if no key is specified)
  - value (`Object`) —
    the value
  - timestamp (`Fixnum`) —
    the timestamp of this record
  - partition (`Fixnum`) —
    the partition to which the record will be sent (or null if no partition was specified)

Returns:

- (`::VertxKafkaClient::KafkaProducerRecord`) —
  Vert.x producer record

Raises:

- (`ArgumentError`)

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

    def self.create(param_1=nil,param_2=nil,param_3=nil,param_4=nil,param_5=nil)
      if param_1.class == String && ::Vertx::Util::unknown_type.accept?(param_2) && !block_given? && param_3 == nil && param_4 == nil && param_5 == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxKafkaClientProducer::KafkaProducerRecord.java_method(:create, [Java::java.lang.String.java_class,Java::java.lang.Object.java_class]).call(param_1,::Vertx::Util::Utils.to_object(param_2)),::VertxKafkaClient::KafkaProducerRecord, nil, nil)
      elsif param_1.class == String && ::Vertx::Util::unknown_type.accept?(param_2) && ::Vertx::Util::unknown_type.accept?(param_3) && !block_given? && param_4 == nil && param_5 == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxKafkaClientProducer::KafkaProducerRecord.java_method(:create, [Java::java.lang.String.java_class,Java::java.lang.Object.java_class,Java::java.lang.Object.java_class]).call(param_1,::Vertx::Util::Utils.to_object(param_2),::Vertx::Util::Utils.to_object(param_3)),::VertxKafkaClient::KafkaProducerRecord, nil, nil)
      elsif param_1.class == String && ::Vertx::Util::unknown_type.accept?(param_2) && ::Vertx::Util::unknown_type.accept?(param_3) && param_4.class == Fixnum && param_5.class == Fixnum && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxKafkaClientProducer::KafkaProducerRecord.java_method(:create, [Java::java.lang.String.java_class,Java::java.lang.Object.java_class,Java::java.lang.Object.java_class,Java::JavaLang::Long.java_class,Java::JavaLang::Integer.java_class]).call(param_1,::Vertx::Util::Utils.to_object(param_2),::Vertx::Util::Utils.to_object(param_3),param_4,::Vertx::Util::Utils.to_integer(param_5)),::VertxKafkaClient::KafkaProducerRecord, nil, nil)
      end
      raise ArgumentError, "Invalid arguments when calling create(#{param_1},#{param_2},#{param_3},#{param_4},#{param_5})"
    end

## Instance Method Details

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

    51
    52
    53
    54
    55
    56
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-kafka-client/kafka_producer_record.rb', line 51

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

Returns the partition to which the record will be sent (or null if no partition was specified)

Returns:

- (`Fixnum`) —
  the partition to which the record will be sent (or null if no partition was specified)

Raises:

- (`ArgumentError`)

    72
    73
    74
    75
    76
    77
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-kafka-client/kafka_producer_record.rb', line 72

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

    65
    66
    67
    68
    69
    70
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-kafka-client/kafka_producer_record.rb', line 65

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

### - (`String`) topic

Returns the topic this record is being sent to

Returns:

- (`String`) —
  the topic this record is being sent to

Raises:

- (`ArgumentError`)

    44
    45
    46
    47
    48
    49
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-kafka-client/kafka_producer_record.rb', line 44

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

    58
    59
    60
    61
    62
    63
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-kafka-client/kafka_producer_record.rb', line 58

    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