Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
Offsets |
build()
Builds an instance.
|
static Offsets.Builder |
newBuilder()
Creates a new Builder instance.
|
Offsets.Builder |
setAsOfTime(long asOfTime)
Sets the as of time for the collection of offsets.
|
Offsets.Builder |
setOffsets(List<Offsets.PartitionOffset> offsets)
Sets the collection of offsets.
|
public static Offsets.Builder newBuilder()
public Offsets.Builder setAsOfTime(long asOfTime)
asOfTime
- the as of time for the offsets.IllegalArgumentException
- if the asOfTime
is less than 0.public Offsets.Builder setOffsets(List<Offsets.PartitionOffset> offsets)
offsets
- the collection of offsetsIllegalArgumentException
- if the offsets
is null
.public Offsets build()
IllegalStateException
- if the asOfTime
is not set or the specified
offsets
contains duplicate entries for a topic partition.Copyright © 2017 The Apache Software Foundation. All rights reserved.