http://git-wip-us.apache.org/repos/asf/kafka-site/blob/e047c4b2/090/javadoc/org/apache/kafka/clients/consumer/MockConsumer.html ---------------------------------------------------------------------- diff --git a/090/javadoc/org/apache/kafka/clients/consumer/MockConsumer.html b/090/javadoc/org/apache/kafka/clients/consumer/MockConsumer.html index d286862..fde12c9 100644 --- a/090/javadoc/org/apache/kafka/clients/consumer/MockConsumer.html +++ b/090/javadoc/org/apache/kafka/clients/consumer/MockConsumer.html @@ -2,15 +2,15 @@ - -MockConsumer (clients 0.8.3-SNAPSHOT API) - + +MockConsumer (clients 0.9.0.0 API) + @@ -103,10 +103,9 @@ extends java.lang.Object implements Consumer<K,V>
A mock of the Consumer interface you can use for testing code that uses Kafka. This class is not - threadsafe -

- The consumer runs in the user thread and multiplexes I/O over TCP connections to each of the brokers it needs to - communicate with. Failure to close the consumer after use will leak these resources.

+ threadsafe . However, you can use the schedulePollTask(Runnable) method to write multithreaded tests + where a driver thread waits for poll(long) to be called by a background thread and then can safely perform + operations during a callback. @@ -125,7 +124,7 @@ implements Constructor and Description -MockConsumer()  +MockConsumer(OffsetResetStrategy offsetResetStrategy)  @@ -148,75 +147,149 @@ implements void +assign(java.util.List<TopicPartition> partitions)  + + +java.util.Set<TopicPartition> +assignment()  + + +void close()  +boolean +closed()  + + +void +commitAsync()  + + void -commit(CommitType commitType)  +commitAsync(java.util.Map<TopicPartition,OffsetAndMetadata> offsets, + OffsetCommitCallback callback)  void -commit(java.util.Map<TopicPartition,java.lang.Long> offsets, - CommitType commitType)  +commitAsync(OffsetCommitCallback callback)  -long +void +commitSync()  + + +void +commitSync(java.util.Map<TopicPartition,OffsetAndMetadata> offsets)  + + +OffsetAndMetadata committed(TopicPartition partition)  +java.util.Map<java.lang.String,java.util.List<PartitionInfo>> +listTopics()  + + java.util.Map<MetricName,? extends Metric> metrics()  - + java.util.List<PartitionInfo> partitionsFor(java.lang.String topic)  + +void +pause(TopicPartition... partitions)  + +java.util.Set<TopicPartition> +paused()  + + ConsumerRecords<K,V> poll(long timeout)  - + long position(TopicPartition partition)  + +void +rebalance(java.util.Collection<TopicPartition> newAssignment) +
Simulate a rebalance event.
+ + void -seek(TopicPartition partition, - long offset)  +resume(TopicPartition... partitions)  void -seekToBeginning(TopicPartition... partitions)  +scheduleNopPollTask()  void +schedulePollTask(java.lang.Runnable task) +
Schedule a task to be executed during a poll().
+ + + +void +seek(TopicPartition partition, + long offset)  + + +void +seekToBeginning(TopicPartition... partitions)  + + +void seekToEnd(TopicPartition... partitions)  + +void +setException(KafkaException exception)  + void -subscribe(java.lang.String... topics)  +subscribe(java.util.List<java.lang.String> topics)  void -subscribe(TopicPartition... partitions)  +subscribe(java.util.List<java.lang.String> topics, + ConsumerRebalanceListener listener)  -java.util.Set<TopicPartition> -subscriptions()  +void +subscribe(java.util.regex.Pattern pattern, + ConsumerRebalanceListener listener)  + + +java.util.Set<java.lang.String> +subscription()  + + +void +unsubscribe()  void -unsubscribe(java.lang.String... topics)  +updateBeginningOffsets(java.util.Map<TopicPartition,java.lang.Long> newOffsets)  void -unsubscribe(TopicPartition... partitions)  +updateEndOffsets(java.util.Map<TopicPartition,java.lang.Long> newOffsets)  void -updatePartitions(java.lang.String topic, +updatePartitions(java.lang.String topic, java.util.List<PartitionInfo> partitions)  + +void +wakeup()  + - + + + + + - + + + + + + + + + + + + + @@ -380,8 +539,8 @@ implements seek in interface Consumer<K,V> -
See Also:
KafkaConsumer.seek(TopicPartition, long)
+
seek in interface Consumer<K,V>
+
See Also:
KafkaConsumer.seek(TopicPartition, long)
@@ -390,7 +549,7 @@ implements
  • committed

    -
    public long committed(TopicPartition partition)
    +
    public OffsetAndMetadata committed(TopicPartition partition)
    Specified by:
    committed in interface Consumer<K,V>
    @@ -423,6 +582,15 @@ implements See Also:
    KafkaConsumer.seekToBeginning(TopicPartition...)
  • + + + + @@ -436,6 +604,15 @@ implements See Also:
    KafkaConsumer.seekToEnd(TopicPartition...)
    + + + + @@ -462,6 +639,19 @@ implements See Also:
    KafkaConsumer.partitionsFor(String)
    + + + + @@ -472,10 +662,36 @@ implements PartitionInfo> partitions) + + + + + + + + - http://git-wip-us.apache.org/repos/asf/kafka-site/blob/e047c4b2/090/javadoc/org/apache/kafka/clients/consumer/NoOffsetForPartitionException.html ---------------------------------------------------------------------- diff --git a/090/javadoc/org/apache/kafka/clients/consumer/NoOffsetForPartitionException.html b/090/javadoc/org/apache/kafka/clients/consumer/NoOffsetForPartitionException.html index 0cbe65d..1598aa9 100644 --- a/090/javadoc/org/apache/kafka/clients/consumer/NoOffsetForPartitionException.html +++ b/090/javadoc/org/apache/kafka/clients/consumer/NoOffsetForPartitionException.html @@ -2,15 +2,15 @@ - -NoOffsetForPartitionException (clients 0.8.3-SNAPSHOT API) - + +NoOffsetForPartitionException (clients 0.9.0.0 API) + @@ -36,7 +36,7 @@ @@ -98,6 +98,9 @@
  • org.apache.kafka.common.KafkaException
  • + +
    @@ -141,7 +147,7 @@ extends Constructor and Description -NoOffsetForPartitionException(java.lang.String message)  +NoOffsetForPartitionException(TopicPartition partition)  @@ -152,6 +158,21 @@ extends

    Method Summary

    + + + + + + + + + + + + + + +
    Methods 
    Modifier and TypeMethod and Description
    TopicPartitionpartition() 
    java.util.Set<TopicPartition>partitions() 
    + +
    http://git-wip-us.apache.org/repos/asf/kafka-site/blob/e047c4b2/090/javadoc/org/apache/kafka/clients/consumer/OffsetAndMetadata.html ---------------------------------------------------------------------- diff --git a/090/javadoc/org/apache/kafka/clients/consumer/OffsetAndMetadata.html b/090/javadoc/org/apache/kafka/clients/consumer/OffsetAndMetadata.html new file mode 100644 index 0000000..6490db1 --- /dev/null +++ b/090/javadoc/org/apache/kafka/clients/consumer/OffsetAndMetadata.html @@ -0,0 +1,344 @@ + + + + + +OffsetAndMetadata (clients 0.9.0.0 API) + + + + + + + +
    + + + + + +
    + + + +
    +
    org.apache.kafka.clients.consumer
    +

    Class OffsetAndMetadata

    +
    +
    + +
    + +
    +
    + +
    +
    + +
    +
    + + +
    + + + + + +
    + + + +