Interface Callback

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Callback
A callback interface that the user can implement to allow code to execute when the request is complete. This callback will generally execute in the background I/O thread so it should be fast.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onCompletion(RecordMetadata metadata, Exception exception)
    A callback method the user can implement to provide asynchronous handling of request completion.