Package com.fauna.event
Class FaunaEvent.Builder<E>
- java.lang.Object
-
- com.fauna.event.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.ObjectBuilder class for constructing aFaunaEventinstance.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FaunaEvent<E>build()Builds and returns aFaunaEventinstance.FaunaEvent.Builder<E>cursor(java.lang.String cursor)Sets the cursor for the event.FaunaEvent.Builder<E>error(ErrorInfo error)Sets the error information for the event.FaunaEvent.Builder<E>eventType(FaunaEvent.EventType eventType)Sets the event type.FaunaEvent.Builder<E>parseData(com.fasterxml.jackson.core.JsonParser parser)Parses and sets the event data from the given JSON parser.FaunaEvent.Builder<E>stats(QueryStats stats)Sets the query statistics for the event.FaunaEvent.Builder<E>txnTs(java.lang.Long txnTs)Sets the transaction timestamp for the event.
-
-
-
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
Builderinstance.
-
eventType
public FaunaEvent.Builder<E> eventType(FaunaEvent.EventType eventType)
Sets the event type.- Parameters:
eventType- TheFaunaEvent.EventTypeof the event.- Returns:
- This
Builderinstance.
-
stats
public FaunaEvent.Builder<E> stats(QueryStats stats)
Sets the query statistics for the event.- Parameters:
stats- TheQueryStatsto set.- Returns:
- This
Builderinstance.
-
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- TheJsonParserto decode the data from.- Returns:
- This
Builderinstance.
-
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
Builderinstance.
-
error
public FaunaEvent.Builder<E> error(ErrorInfo error)
Sets the error information for the event.- Parameters:
error- TheErrorInfocontaining error details.- Returns:
- This
Builderinstance.
-
build
public FaunaEvent<E> build()
Builds and returns aFaunaEventinstance.- Returns:
- A new
FaunaEventinstance.
-
-