org.apache.spark.streaming.kafka
Class OffsetRange

Object
  extended by org.apache.spark.streaming.kafka.OffsetRange
All Implemented Interfaces:
java.io.Serializable

public final class OffsetRange
extends Object
implements scala.Serializable

:: Experimental :: Represents a range of offsets from a single Kafka TopicAndPartition. Instances of this class can be created with OffsetRange.create().

See Also:
Serialized Form

Method Summary
static OffsetRange apply(String topic, int partition, long fromOffset, long untilOffset)
           
static OffsetRange apply(kafka.common.TopicAndPartition topicAndPartition, long fromOffset, long untilOffset)
           
static OffsetRange create(String topic, int partition, long fromOffset, long untilOffset)
           
static OffsetRange create(kafka.common.TopicAndPartition topicAndPartition, long fromOffset, long untilOffset)
           
 boolean equals(Object obj)
          exclusive ending offset
 long fromOffset()
          inclusive starting offset
 int hashCode()
           
 int partition()
          Kafka partition id
 String topic()
          Kafka topic name
 String toString()
           
 long untilOffset()
          exclusive ending offset
 
Methods inherited from class Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static OffsetRange create(String topic,
                                 int partition,
                                 long fromOffset,
                                 long untilOffset)

create

public static OffsetRange create(kafka.common.TopicAndPartition topicAndPartition,
                                 long fromOffset,
                                 long untilOffset)

apply

public static OffsetRange apply(String topic,
                                int partition,
                                long fromOffset,
                                long untilOffset)

apply

public static OffsetRange apply(kafka.common.TopicAndPartition topicAndPartition,
                                long fromOffset,
                                long untilOffset)

topic

public String topic()
Kafka topic name


partition

public int partition()
Kafka partition id


fromOffset

public long fromOffset()
inclusive starting offset


untilOffset

public long untilOffset()
exclusive ending offset


equals

public boolean equals(Object obj)
exclusive ending offset

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object