org.apache.kafka.clients.consumer
Class OffsetMetadata

java.lang.Object
  extended by org.apache.kafka.clients.consumer.OffsetMetadata

public final class OffsetMetadata
extends java.lang.Object

The metadata for an offset commit that has been acknowledged by the server


Constructor Summary
OffsetMetadata(java.util.Map<TopicPartition,java.lang.Long> offsets)
           
OffsetMetadata(java.util.Map<TopicPartition,java.lang.Long> offsets, java.util.Map<TopicPartition,java.lang.RuntimeException> errors)
           
 
Method Summary
 java.lang.Exception error(TopicPartition partition)
           
 long offset(TopicPartition partition)
          The offset of the record in the topic/partition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OffsetMetadata

public OffsetMetadata(java.util.Map<TopicPartition,java.lang.Long> offsets,
                      java.util.Map<TopicPartition,java.lang.RuntimeException> errors)

OffsetMetadata

public OffsetMetadata(java.util.Map<TopicPartition,java.lang.Long> offsets)
Method Detail

offset

public long offset(TopicPartition partition)
The offset of the record in the topic/partition.


error

public java.lang.Exception error(TopicPartition partition)
Returns:
The exception corresponding to the error code returned by the server