Skip to content

Commit 1a7ad70

Browse files
authored
MINOR: remove unneccessary public keyword from ProducerInterceptor/ConsumerInterceptor interface (#10801)
Co-authored-by: “KahnCheny” <“[email protected]”> Reviewers: Luke Chen <[email protected]>, David Jacot <[email protected]>
1 parent 2d7a4ed commit 1a7ad70

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerInterceptor.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public interface ConsumerInterceptor<K, V> extends Configurable, AutoCloseable {
6565
* @param records records to be consumed by the client or records returned by the previous interceptors in the list.
6666
* @return records that are either modified by the interceptor or same as records passed to this method.
6767
*/
68-
public ConsumerRecords<K, V> onConsume(ConsumerRecords<K, V> records);
68+
ConsumerRecords<K, V> onConsume(ConsumerRecords<K, V> records);
6969

7070
/**
7171
* This is called when offsets get committed.
@@ -74,10 +74,10 @@ public interface ConsumerInterceptor<K, V> extends Configurable, AutoCloseable {
7474
*
7575
* @param offsets A map of offsets by partition with associated metadata
7676
*/
77-
public void onCommit(Map<TopicPartition, OffsetAndMetadata> offsets);
77+
void onCommit(Map<TopicPartition, OffsetAndMetadata> offsets);
7878

7979
/**
8080
* This is called when interceptor is closed
8181
*/
82-
public void close();
82+
void close();
8383
}

clients/src/main/java/org/apache/kafka/clients/producer/ProducerInterceptor.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public interface ProducerInterceptor<K, V> extends Configurable {
6464
* @param record the record from client or the record returned by the previous interceptor in the chain of interceptors.
6565
* @return producer record to send to topic/partition
6666
*/
67-
public ProducerRecord<K, V> onSend(ProducerRecord<K, V> record);
67+
ProducerRecord<K, V> onSend(ProducerRecord<K, V> record);
6868

6969
/**
7070
* This method is called when the record sent to the server has been acknowledged, or when sending the record fails before
@@ -86,10 +86,10 @@ public interface ProducerInterceptor<K, V> extends Configurable {
8686
* {@link org.apache.kafka.clients.producer.KafkaProducer#send(ProducerRecord)}.
8787
* @param exception The exception thrown during processing of this record. Null if no error occurred.
8888
*/
89-
public void onAcknowledgement(RecordMetadata metadata, Exception exception);
89+
void onAcknowledgement(RecordMetadata metadata, Exception exception);
9090

9191
/**
9292
* This is called when interceptor is closed
9393
*/
94-
public void close();
94+
void close();
9595
}

0 commit comments

Comments
 (0)