Interface UniqueTicketIdGenerator

  • 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 UniqueTicketIdGenerator
    Interface that enables for pluggable unique ticket Ids strategies.
    Since:
    3.0.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static char SEPARATOR
      Separator character that separates prefix from the rest of the ticket id.
      static int TICKET_SIZE
      Default ticket size 24 bytes raw, 32 bytes once encoded to base64.
    • Field Detail

      • SEPARATOR

        static final char SEPARATOR
        Separator character that separates prefix from the rest of the ticket id.
        See Also:
        Constant Field Values
      • TICKET_SIZE

        static final int TICKET_SIZE
        Default ticket size 24 bytes raw, 32 bytes once encoded to base64.
        See Also:
        Constant Field Values
    • Method Detail

      • getNewTicketId

        java.lang.String getNewTicketId​(java.lang.String prefix)
        Return a new unique ticket id beginning with the prefix.
        Parameters:
        prefix - The prefix we want attached to the ticket.
        Returns:
        the unique ticket id