dev.responsive.kafka.internal.clients.DelegatingConsumer Maven / Gradle / Ivy
The newest version!
/*
* Copyright 2024 Responsive Computing, Inc.
*
* This source code is licensed under the Responsive Business Source License Agreement v1.0
* available at:
*
* https://www.responsive.dev/legal/responsive-bsl-10
*
* This software requires a valid Commercial License Key for production use. Trial and commercial
* licenses can be obtained at https://www.responsive.dev
*/
package dev.responsive.kafka.internal.clients;
import java.time.Duration;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.OptionalLong;
import java.util.Set;
import java.util.regex.Pattern;
import org.apache.kafka.clients.consumer.Consumer;
import org.apache.kafka.clients.consumer.ConsumerGroupMetadata;
import org.apache.kafka.clients.consumer.ConsumerRebalanceListener;
import org.apache.kafka.clients.consumer.ConsumerRecords;
import org.apache.kafka.clients.consumer.OffsetAndMetadata;
import org.apache.kafka.clients.consumer.OffsetAndTimestamp;
import org.apache.kafka.clients.consumer.OffsetCommitCallback;
import org.apache.kafka.common.Metric;
import org.apache.kafka.common.MetricName;
import org.apache.kafka.common.PartitionInfo;
import org.apache.kafka.common.TopicPartition;
import org.apache.kafka.common.Uuid;
public abstract class DelegatingConsumer implements Consumer {
private final Consumer delegate;
public DelegatingConsumer(final Consumer delegate) {
this.delegate = delegate;
}
@Override
public void assign(final Collection partitions) {
delegate.assign(partitions);
}
@Override
public Set assignment() {
return delegate.assignment();
}
@Override
public Set subscription() {
return delegate.subscription();
}
@Override
public void subscribe(final Collection topics) {
delegate.subscribe(topics);
}
@Override
public void subscribe(final Collection topics, final ConsumerRebalanceListener callback) {
delegate.subscribe(topics, callback);
}
@Override
public void subscribe(final Pattern pattern, final ConsumerRebalanceListener callback) {
delegate.subscribe(pattern, callback);
}
@Override
public void subscribe(final Pattern pattern) {
delegate.subscribe(pattern);
}
@Override
public void unsubscribe() {
delegate.unsubscribe();
}
@Override
@Deprecated
public ConsumerRecords poll(final long timeout) {
return delegate.poll(timeout);
}
@Override
public ConsumerRecords poll(final Duration timeout) {
return delegate.poll(timeout);
}
@Override
public void commitSync() {
delegate.commitSync();
}
@Override
public void commitSync(final Duration timeout) {
delegate.commitSync(timeout);
}
@Override
public void commitSync(final Map offsets) {
delegate.commitSync(offsets);
}
@Override
public void commitSync(final Map offsets,
final Duration timeout) {
delegate.commitSync(offsets, timeout);
}
@Override
public void commitAsync() {
delegate.commitAsync();
}
@Override
public void commitAsync(final OffsetCommitCallback callback) {
delegate.commitAsync(callback);
}
@Override
public void commitAsync(final Map offsets,
final OffsetCommitCallback callback) {
delegate.commitAsync(offsets, callback);
}
@Override
public void seek(final TopicPartition partition, final long offset) {
delegate.seek(partition, offset);
}
@Override
public void seek(final TopicPartition partition, final OffsetAndMetadata offsetAndMetadata) {
delegate.seek(partition, offsetAndMetadata);
}
@Override
public void seekToBeginning(final Collection partitions) {
delegate.seekToBeginning(partitions);
}
@Override
public void seekToEnd(final Collection partitions) {
delegate.seekToEnd(partitions);
}
@Override
public long position(final TopicPartition partition) {
return delegate.position(partition);
}
@Override
public long position(final TopicPartition partition, final Duration timeout) {
return delegate.position(partition, timeout);
}
@Override
@Deprecated
public OffsetAndMetadata committed(final TopicPartition partition) {
return delegate.committed(partition);
}
@Override
@Deprecated
public OffsetAndMetadata committed(final TopicPartition partition, final Duration timeout) {
return delegate.committed(partition, timeout);
}
@Override
public Map committed(final Set partitions) {
return delegate.committed(partitions);
}
@Override
public Map committed(final Set partitions,
final Duration timeout) {
return delegate.committed(partitions, timeout);
}
@Override
public Map metrics() {
return delegate.metrics();
}
@Override
public List partitionsFor(final String topic) {
return delegate.partitionsFor(topic);
}
@Override
public List partitionsFor(final String topic, final Duration timeout) {
return delegate.partitionsFor(topic, timeout);
}
@Override
public Map> listTopics() {
return delegate.listTopics();
}
@Override
public Map> listTopics(final Duration timeout) {
return delegate.listTopics(timeout);
}
@Override
public Set paused() {
return delegate.paused();
}
@Override
public void pause(final Collection partitions) {
delegate.pause(partitions);
}
@Override
public void resume(final Collection partitions) {
delegate.resume(partitions);
}
@Override
public Map offsetsForTimes(
final Map timestampsToSearch) {
return delegate.offsetsForTimes(timestampsToSearch);
}
@Override
public Map offsetsForTimes(
final Map timestampsToSearch, final Duration timeout) {
return delegate.offsetsForTimes(timestampsToSearch, timeout);
}
@Override
public Map beginningOffsets(final Collection partitions) {
return delegate.beginningOffsets(partitions);
}
@Override
public Map beginningOffsets(final Collection partitions,
final Duration timeout) {
return delegate.beginningOffsets(partitions, timeout);
}
@Override
public Map endOffsets(final Collection partitions) {
return delegate.endOffsets(partitions);
}
@Override
public Map endOffsets(final Collection partitions,
final Duration timeout) {
return delegate.endOffsets(partitions, timeout);
}
@Override
public OptionalLong currentLag(final TopicPartition topicPartition) {
return delegate.currentLag(topicPartition);
}
@Override
public ConsumerGroupMetadata groupMetadata() {
return delegate.groupMetadata();
}
@Override
public void enforceRebalance() {
delegate.enforceRebalance();
}
@Override
public void enforceRebalance(final String reason) {
delegate.enforceRebalance(reason);
}
@Override
public void close() {
delegate.close();
}
@Override
public void close(final Duration timeout) {
delegate.close(timeout);
}
@Override
public void wakeup() {
delegate.wakeup();
}
@Override
public Uuid clientInstanceId(final Duration duration) {
return delegate.clientInstanceId(duration);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy