test_class.file: clients/src/test/java/org/apache/kafka/clients/producer/KafkaProducerTest.java
test_class.identifier: KafkaProducerTest
test_case.body: @Test
      public void testInterceptorConstructClose() throws Exception {
          try {
              Properties props = new Properties();
              // test with client ID assigned by KafkaProducer
              props.setProperty(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9999");
              props.setProperty(ProducerConfig.INTERCEPTOR_CLASSES_CONFIG, MockProducerInterceptor.class.getName());
              props.setProperty(MockProducerInterceptor.APPEND_STRING_PROP, "something");
  
              KafkaProducer<String, String> producer = new KafkaProducer<String, String>(
                      props, new StringSerializer(), new StringSerializer());
              Assert.assertEquals(1, MockProducerInterceptor.INIT_COUNT.get());
              Assert.assertEquals(0, MockProducerInterceptor.CLOSE_COUNT.get());
  
              producer.close();
              Assert.assertEquals(1, MockProducerInterceptor.INIT_COUNT.get());
              Assert.assertEquals(1, MockProducerInterceptor.CLOSE_COUNT.get());
          } finally {
              // cleanup since we are using mutable static variables in MockProducerInterceptor
              MockProducerInterceptor.resetCounters();
          }
      }
test_case.class_method_signature: KafkaProducerTest.testInterceptorConstructClose()
test_case.full_signature: @Test public void testInterceptorConstructClose()
test_case.identifier: testInterceptorConstructClose
test_case.invocations: setProperty setProperty getName setProperty assertEquals get assertEquals get close assertEquals get assertEquals get resetCounters
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testInterceptorConstructClose()
focal_class.declarator: log = LoggerFactory.getLogger(KafkaProducer.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(KafkaProducer.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: PRODUCER_CLIENT_ID_SEQUENCE = new AtomicInteger(1)
focal_class.modifier: private static final
focal_class.original_string: private static final AtomicInteger PRODUCER_CLIENT_ID_SEQUENCE = new AtomicInteger(1);
focal_class.type: AtomicInteger
focal_class.var_name: PRODUCER_CLIENT_ID_SEQUENCE
focal_class.declarator: JMX_PREFIX = "kafka.producer"
focal_class.modifier: private static final
focal_class.original_string: private static final String JMX_PREFIX = "kafka.producer";
focal_class.type: String
focal_class.var_name: JMX_PREFIX
focal_class.declarator: clientId
focal_class.modifier: private
focal_class.original_string: private String clientId;
focal_class.type: String
focal_class.var_name: clientId
focal_class.declarator: partitioner
focal_class.modifier: private final
focal_class.original_string: private final Partitioner partitioner;
focal_class.type: Partitioner
focal_class.var_name: partitioner
focal_class.declarator: maxRequestSize
focal_class.modifier: private final
focal_class.original_string: private final int maxRequestSize;
focal_class.type: int
focal_class.var_name: maxRequestSize
focal_class.declarator: totalMemorySize
focal_class.modifier: private final
focal_class.original_string: private final long totalMemorySize;
focal_class.type: long
focal_class.var_name: totalMemorySize
focal_class.declarator: metadata
focal_class.modifier: private final
focal_class.original_string: private final Metadata metadata;
focal_class.type: Metadata
focal_class.var_name: metadata
focal_class.declarator: accumulator
focal_class.modifier: private final
focal_class.original_string: private final RecordAccumulator accumulator;
focal_class.type: RecordAccumulator
focal_class.var_name: accumulator
focal_class.declarator: sender
focal_class.modifier: private final
focal_class.original_string: private final Sender sender;
focal_class.type: Sender
focal_class.var_name: sender
focal_class.declarator: metrics
focal_class.modifier: private final
focal_class.original_string: private final Metrics metrics;
focal_class.type: Metrics
focal_class.var_name: metrics
focal_class.declarator: ioThread
focal_class.modifier: private final
focal_class.original_string: private final Thread ioThread;
focal_class.type: Thread
focal_class.var_name: ioThread
focal_class.declarator: compressionType
focal_class.modifier: private final
focal_class.original_string: private final CompressionType compressionType;
focal_class.type: CompressionType
focal_class.var_name: compressionType
focal_class.declarator: errors
focal_class.modifier: private final
focal_class.original_string: private final Sensor errors;
focal_class.type: Sensor
focal_class.var_name: errors
focal_class.declarator: time
focal_class.modifier: private final
focal_class.original_string: private final Time time;
focal_class.type: Time
focal_class.var_name: time
focal_class.declarator: keySerializer
focal_class.modifier: private final
focal_class.original_string: private final Serializer<K> keySerializer;
focal_class.type: Serializer<K>
focal_class.var_name: keySerializer
focal_class.declarator: valueSerializer
focal_class.modifier: private final
focal_class.original_string: private final Serializer<V> valueSerializer;
focal_class.type: Serializer<V>
focal_class.var_name: valueSerializer
focal_class.declarator: producerConfig
focal_class.modifier: private final
focal_class.original_string: private final ProducerConfig producerConfig;
focal_class.type: ProducerConfig
focal_class.var_name: producerConfig
focal_class.declarator: maxBlockTimeMs
focal_class.modifier: private final
focal_class.original_string: private final long maxBlockTimeMs;
focal_class.type: long
focal_class.var_name: maxBlockTimeMs
focal_class.declarator: requestTimeoutMs
focal_class.modifier: private final
focal_class.original_string: private final int requestTimeoutMs;
focal_class.type: int
focal_class.var_name: requestTimeoutMs
focal_class.declarator: interceptors
focal_class.modifier: private final
focal_class.original_string: private final ProducerInterceptors<K, V> interceptors;
focal_class.type: ProducerInterceptors<K, V>
focal_class.var_name: interceptors
focal_class.file: clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java
focal_class.identifier: KafkaProducer
focal_class.interfaces: implements Producer<K, V>
focal_class.class_method_signature: KafkaProducer.KafkaProducer(Map<String, Object> configs)
focal_class.full_signature: public  KafkaProducer(Map<String, Object> configs)
focal_class.identifier: KafkaProducer
focal_class.modifiers: public
focal_class.parameters: (Map<String, Object> configs)
focal_class.signature:  KafkaProducer(Map<String, Object> configs)
focal_class.class_method_signature: KafkaProducer.KafkaProducer(Map<String, Object> configs, Serializer<K> keySerializer, Serializer<V> valueSerializer)
focal_class.full_signature: public  KafkaProducer(Map<String, Object> configs, Serializer<K> keySerializer, Serializer<V> valueSerializer)
focal_class.identifier: KafkaProducer
focal_class.modifiers: public
focal_class.parameters: (Map<String, Object> configs, Serializer<K> keySerializer, Serializer<V> valueSerializer)
focal_class.signature:  KafkaProducer(Map<String, Object> configs, Serializer<K> keySerializer, Serializer<V> valueSerializer)
focal_class.class_method_signature: KafkaProducer.KafkaProducer(Properties properties)
focal_class.full_signature: public  KafkaProducer(Properties properties)
focal_class.identifier: KafkaProducer
focal_class.modifiers: public
focal_class.parameters: (Properties properties)
focal_class.signature:  KafkaProducer(Properties properties)
focal_class.class_method_signature: KafkaProducer.KafkaProducer(Properties properties, Serializer<K> keySerializer, Serializer<V> valueSerializer)
focal_class.full_signature: public  KafkaProducer(Properties properties, Serializer<K> keySerializer, Serializer<V> valueSerializer)
focal_class.identifier: KafkaProducer
focal_class.modifiers: public
focal_class.parameters: (Properties properties, Serializer<K> keySerializer, Serializer<V> valueSerializer)
focal_class.signature:  KafkaProducer(Properties properties, Serializer<K> keySerializer, Serializer<V> valueSerializer)
focal_class.class_method_signature: KafkaProducer.KafkaProducer(ProducerConfig config, Serializer<K> keySerializer, Serializer<V> valueSerializer)
focal_class.full_signature: @SuppressWarnings({ "unchecked", "deprecation" }) private  KafkaProducer(ProducerConfig config, Serializer<K> keySerializer, Serializer<V> valueSerializer)
focal_class.identifier: KafkaProducer
focal_class.modifiers: @SuppressWarnings({ "unchecked", "deprecation" }) private
focal_class.parameters: (ProducerConfig config, Serializer<K> keySerializer, Serializer<V> valueSerializer)
focal_class.signature:  KafkaProducer(ProducerConfig config, Serializer<K> keySerializer, Serializer<V> valueSerializer)
focal_class.class_method_signature: KafkaProducer.parseAcks(String acksString)
focal_class.full_signature: private static int parseAcks(String acksString)
focal_class.identifier: parseAcks
focal_class.modifiers: private static
focal_class.parameters: (String acksString)
focal_class.return: int
focal_class.signature: int parseAcks(String acksString)
focal_class.class_method_signature: KafkaProducer.send(ProducerRecord<K, V> record)
focal_class.full_signature: @Override public Future<RecordMetadata> send(ProducerRecord<K, V> record)
focal_class.identifier: send
focal_class.modifiers: @Override public
focal_class.parameters: (ProducerRecord<K, V> record)
focal_class.return: Future<RecordMetadata>
focal_class.signature: Future<RecordMetadata> send(ProducerRecord<K, V> record)
focal_class.class_method_signature: KafkaProducer.send(ProducerRecord<K, V> record, Callback callback)
focal_class.full_signature: @Override public Future<RecordMetadata> send(ProducerRecord<K, V> record, Callback callback)
focal_class.identifier: send
focal_class.modifiers: @Override public
focal_class.parameters: (ProducerRecord<K, V> record, Callback callback)
focal_class.return: Future<RecordMetadata>
focal_class.signature: Future<RecordMetadata> send(ProducerRecord<K, V> record, Callback callback)
focal_class.class_method_signature: KafkaProducer.doSend(ProducerRecord<K, V> record, Callback callback)
focal_class.full_signature: private Future<RecordMetadata> doSend(ProducerRecord<K, V> record, Callback callback)
focal_class.identifier: doSend
focal_class.modifiers: private
focal_class.parameters: (ProducerRecord<K, V> record, Callback callback)
focal_class.return: Future<RecordMetadata>
focal_class.signature: Future<RecordMetadata> doSend(ProducerRecord<K, V> record, Callback callback)
focal_class.class_method_signature: KafkaProducer.waitOnMetadata(String topic, long maxWaitMs)
focal_class.full_signature: private long waitOnMetadata(String topic, long maxWaitMs)
focal_class.identifier: waitOnMetadata
focal_class.modifiers: private
focal_class.parameters: (String topic, long maxWaitMs)
focal_class.return: long
focal_class.signature: long waitOnMetadata(String topic, long maxWaitMs)
focal_class.class_method_signature: KafkaProducer.ensureValidRecordSize(int size)
focal_class.full_signature: private void ensureValidRecordSize(int size)
focal_class.identifier: ensureValidRecordSize
focal_class.modifiers: private
focal_class.parameters: (int size)
focal_class.return: void
focal_class.signature: void ensureValidRecordSize(int size)
focal_class.class_method_signature: KafkaProducer.flush()
focal_class.full_signature: @Override public void flush()
focal_class.identifier: flush
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void flush()
focal_class.class_method_signature: KafkaProducer.partitionsFor(String topic)
focal_class.full_signature: @Override public List<PartitionInfo> partitionsFor(String topic)
focal_class.identifier: partitionsFor
focal_class.modifiers: @Override public
focal_class.parameters: (String topic)
focal_class.return: List<PartitionInfo>
focal_class.signature: List<PartitionInfo> partitionsFor(String topic)
focal_class.class_method_signature: KafkaProducer.metrics()
focal_class.full_signature: @Override public Map<MetricName, ? extends Metric> metrics()
focal_class.identifier: metrics
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Map<MetricName, ? extends Metric>
focal_class.signature: Map<MetricName, ? extends Metric> metrics()
focal_class.class_method_signature: KafkaProducer.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: KafkaProducer.close(long timeout, TimeUnit timeUnit)
focal_class.full_signature: @Override public void close(long timeout, TimeUnit timeUnit)
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: (long timeout, TimeUnit timeUnit)
focal_class.return: void
focal_class.signature: void close(long timeout, TimeUnit timeUnit)
focal_class.class_method_signature: KafkaProducer.close(long timeout, TimeUnit timeUnit, boolean swallowException)
focal_class.full_signature: private void close(long timeout, TimeUnit timeUnit, boolean swallowException)
focal_class.identifier: close
focal_class.modifiers: private
focal_class.parameters: (long timeout, TimeUnit timeUnit, boolean swallowException)
focal_class.return: void
focal_class.signature: void close(long timeout, TimeUnit timeUnit, boolean swallowException)
focal_class.class_method_signature: KafkaProducer.partition(ProducerRecord<K, V> record, byte[] serializedKey, byte[] serializedValue, Cluster cluster)
focal_class.full_signature: private int partition(ProducerRecord<K, V> record, byte[] serializedKey, byte[] serializedValue, Cluster cluster)
focal_class.identifier: partition
focal_class.modifiers: private
focal_class.parameters: (ProducerRecord<K, V> record, byte[] serializedKey, byte[] serializedValue, Cluster cluster)
focal_class.return: int
focal_class.signature: int partition(ProducerRecord<K, V> record, byte[] serializedKey, byte[] serializedValue, Cluster cluster)
focal_method.body: @Override
      public void close() {
          close(Long.MAX_VALUE, TimeUnit.MILLISECONDS);
      }
focal_method.class_method_signature: KafkaProducer.close()
focal_method.full_signature: @Override public void close()
focal_method.identifier: close
focal_method.invocations: close
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void close()