Interface FakeTopic

  • All Implemented Interfaces:
    xyz.block.ftl.ConsumableTopic , xyz.block.ftl.WriteableTopic

    
    public interface FakeTopic<T extends WriteableTopic<P, M>, P, M extends TopicPartitionMapper<in P>>
     implements WriteableTopic<T, M>
                        

    An interface that can be used to mock out a topic for unit testing.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static <T extends WriteableTopic<P, M>, P, M extends TopicPartitionMapper<in P>> T create(Class<T> type)
      abstract P poll() Retrieves items from the topic
      static <T extends WriteableTopic<P, M>, P, M extends TopicPartitionMapper<in P>> P next(T topic)
      • Methods inherited from class xyz.block.ftl.WriteableTopic

        publish
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • create

        @NotNull() static <T extends WriteableTopic<P, M>, P, M extends TopicPartitionMapper<in P>> T create(Class<T> type)
      • poll

         abstract P poll()

        Retrieves items from the topic

        Returns:

        The next item that was written to the topic, or null if it is empty

      • next

         static <T extends WriteableTopic<P, M>, P, M extends TopicPartitionMapper<in P>> P next(T topic)