Class FaunaEvent.Builder<E>

  • Type Parameters:
    E - The type of data contained in the event.
    Enclosing class:
    FaunaEvent<E>

    public static final class FaunaEvent.Builder<E>
    extends java.lang.Object
    Builder class for constructing a FaunaEvent instance.
    • Constructor Detail

      • Builder

        public Builder​(Codec<E> dataCodec)
        Constructs a Builder for building a FaunaEvent.
        Parameters:
        dataCodec - The Codec used to decode event data.
    • Method Detail

      • cursor

        public FaunaEvent.Builder<E> cursor​(java.lang.String cursor)
        Sets the cursor for the event.
        Parameters:
        cursor - The cursor to set.
        Returns:
        This Builder instance.
      • parseData

        public FaunaEvent.Builder<E> parseData​(com.fasterxml.jackson.core.JsonParser parser)
        Parses and sets the event data from the given JSON parser.
        Parameters:
        parser - The JsonParser to decode the data from.
        Returns:
        This Builder instance.
      • txnTs

        public FaunaEvent.Builder<E> txnTs​(java.lang.Long txnTs)
        Sets the transaction timestamp for the event.
        Parameters:
        txnTs - The transaction timestamp to set.
        Returns:
        This Builder instance.
      • error

        public FaunaEvent.Builder<E> error​(ErrorInfo error)
        Sets the error information for the event.
        Parameters:
        error - The ErrorInfo containing error details.
        Returns:
        This Builder instance.
      • build

        public FaunaEvent<E> build()
        Builds and returns a FaunaEvent instance.
        Returns:
        A new FaunaEvent instance.