Package 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 | Description
    --- | --- | ---
    `static OffsetSpec` | `EARLIEST` |
    `static OffsetSpec` | `LATEST` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `OffsetSpec​(long spec)` | Constructor
    `OffsetSpec​(JsonObject json)` | Constructor (from JSON representation)

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | 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`