org.apache.kafka.clients.producer.internals
Class ErrorLoggingCallback

java.lang.Object
  extended by org.apache.kafka.clients.producer.internals.ErrorLoggingCallback
All Implemented Interfaces:
Callback

public class ErrorLoggingCallback
extends java.lang.Object
implements Callback


Constructor Summary
ErrorLoggingCallback(java.lang.String topic, byte[] key, byte[] value, boolean logAsString)
           
 
Method Summary
 void onCompletion(RecordMetadata metadata, java.lang.Exception e)
          A callback method the user can implement to provide asynchronous handling of request completion.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorLoggingCallback

public ErrorLoggingCallback(java.lang.String topic,
                            byte[] key,
                            byte[] value,
                            boolean logAsString)
Method Detail

onCompletion

public void onCompletion(RecordMetadata metadata,
                         java.lang.Exception e)
Description copied from interface: Callback
A callback method the user can implement to provide asynchronous handling of request completion. This method will be called when the record sent to the server has been acknowledged. Exactly one of the arguments will be non-null.

Specified by:
onCompletion in interface Callback
Parameters:
metadata - The metadata for the record that was sent (i.e. the partition and offset). Null if an error occurred.
e - The exception thrown during processing of this record. Null if no error occurred.