Package cz.o2.proxima.direct.core.batch
Class Offset.SimpleOffset
- java.lang.Object
-
- cz.o2.proxima.direct.core.batch.Offset.SimpleOffset
-
- All Implemented Interfaces:
Offset,java.io.Serializable
- Enclosing interface:
- Offset
public static final class Offset.SimpleOffset extends java.lang.Object implements Offset
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface cz.o2.proxima.direct.core.batch.Offset
Offset.SimpleOffset
-
-
Constructor Summary
Constructors Constructor Description SimpleOffset(Partition partition, long elementIndex, boolean last)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)longgetElementIndex()Index of the element within the partition.PartitiongetPartition()Partition the offset belongs to.inthashCode()booleanisLast()Is there any other element in the partition?java.lang.StringtoString()
-
-
-
Constructor Detail
-
SimpleOffset
public SimpleOffset(Partition partition, long elementIndex, boolean last)
-
-
Method Detail
-
getPartition
public Partition getPartition()
Description copied from interface:OffsetPartition the offset belongs to.- Specified by:
getPartitionin interfaceOffset- Returns:
- Partition.
-
getElementIndex
public long getElementIndex()
Description copied from interface:OffsetIndex of the element within the partition. Elements are indexed from zero. Value of `-1` means, no element has been consumed from the partition.- Specified by:
getElementIndexin interfaceOffset- Returns:
- Index of the element or `-1` if no element has been consumed.
-
isLast
public boolean isLast()
Description copied from interface:OffsetIs there any other element in the partition?
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-