Interface GeneratorFunction<R>

Type Parameters:
R - the type of the result of the function
All Superinterfaces:
Serializable
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 GeneratorFunction<R> extends Serializable
A function which takes a timestamp and a sequence number as the input.
Since:
Jet 3.2
  • Method Summary

    Modifier and Type
    Method
    Description
    generate(long timestamp, long sequence)
    Applies the function to the given timestamp and sequence.
  • Method Details

    • generate

      R generate(long timestamp, long sequence) throws Exception
      Applies the function to the given timestamp and sequence.
      Parameters:
      timestamp - the current timestamp
      sequence - the current sequence
      Returns:
      the function result
      Throws:
      Exception