java.lang.Object
io.aiven.commons.kafka.connector.source.impl.nativeProvided.ExampleNativeClient

public class ExampleNativeClient extends Object
A "native" client. This client returns lists of native objects.

In an actual implementation this would connect to the storage and retrieve data.

  • Constructor Details

    • ExampleNativeClient

      public ExampleNativeClient()
      Constructor.
  • Method Details

    • clear

      public void clear()
      Clear the stored data.
    • write

      public void write(String key, byte[] data)
      Write data into the stored data.
      Parameters:
      key - the key for the data.
      data - the data.
    • listObjects

      public Collection<ExampleNativeItem> listObjects()
      List the objects in the stored data.
      Returns:
      the collection of data objects.
    • listObjects

      public Collection<ExampleNativeItem> listObjects(String offset)
      Gets a list of native objects. In an actual implementation this method may retrieve one object or may retrieve a number of objects.
      Parameters:
      offset - This is the key value that was last read or null if there is no last read. It is a String because the K in the NativeSourceData as defined in ExampleNativeSourceData is a String
      Returns:
      the list of native objects. This is a collection of ExampleNativeItem because that is the type of the N in AbstractSourceNativeInfo as defined in ExampleSourceNativeInfo.