io.vertx.kafka.admin

## Class OffsetSpec

- java.lang.Object
- - io.vertx.kafka.admin.OffsetSpec

-     public class OffsetSpec
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static OffsetSpec` | `EARLIEST`
    `static OffsetSpec` | `LATEST`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OffsetSpec(JsonObject json)` Constructor (from JSON representation)
    `OffsetSpec(long spec)` Constructor

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getSpec()`
    `OffsetSpec` | `setSpec(long spec)` Set the offset spec
    `static OffsetSpec` | `TIMESTAMP(long timestamp)`
    `JsonObject` | `toJson()` Convert object to JSON representation
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### EARLIEST

          public static final OffsetSpec EARLIEST

    - #### LATEST

          public static final OffsetSpec LATEST

  - ### Constructor Detail

    - #### OffsetSpec

          public OffsetSpec(long spec)

      Constructor
      Parameters:
        `spec` - the offset spec Spec.EARLIEST, Spec.LATEST, or a Spec.TIMESTAMP(long) value

    - #### OffsetSpec

          public OffsetSpec(JsonObject json)

      Constructor (from JSON representation)
      Parameters:
        `json` - JSON representation

  - ### Method Detail

    - #### TIMESTAMP

          public static final OffsetSpec TIMESTAMP(long timestamp)

    - #### getSpec

          public long getSpec()

      Returns:
        offset spec

    - #### setSpec

          public OffsetSpec setSpec(long spec)

      Set the offset spec
      Parameters:
        `spec` - the offset spec
      Returns:
        current instance of the class to be fluent

    - #### toJson

          public JsonObject toJson()

      Convert object to JSON representation
      Returns:
        JSON representation

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2025 Eclipse. All rights reserved.