Package org.apache.flink.events
Class EventBuilder
- java.lang.Object
-
- org.apache.flink.events.EventBuilder
-
- All Implemented Interfaces:
AttributeBuilder
@Experimental public class EventBuilder extends Object implements AttributeBuilder
Builder used to constructEvent. SeeEvent.builder(Class, String).
-
-
Constructor Summary
Constructors Constructor Description EventBuilder()EventBuilder(Class<?> classScope)EventBuilder(Class<?> classScope, String name)EventBuilder(String classScope, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Eventbuild()Eventbuild(Map<String,String> additionalVariables)Builds the specified instance.StringgetName()EventBuildersetAttribute(String key, boolean value)Additional attribute to be attached to thisEvent.EventBuildersetAttribute(String key, double value)Additional attribute to be attached to thisEvent.EventBuildersetAttribute(String key, long value)Additional attribute to be attached to thisEvent.EventBuildersetAttribute(String key, String value)Additional attribute to be attached to thisEvent.EventBuildersetBody(String body)Sets the textual description of the event.EventBuildersetClassScope(String classScope)Sets the scope of the event, typically the fully qualified name of the emitting class.EventBuildersetName(String name)Sets the name of the event.EventBuildersetObservedTsMillis(long observedTsMillis)Sets the timestamp for when the event happened or was observed, in milliseconds.EventBuildersetSeverity(String severity)Sets the severity of the event, e.g.
-
-
-
Method Detail
-
setObservedTsMillis
public EventBuilder setObservedTsMillis(long observedTsMillis)
Sets the timestamp for when the event happened or was observed, in milliseconds.
-
setName
public EventBuilder setName(String name)
Sets the name of the event.
-
setClassScope
public EventBuilder setClassScope(String classScope)
Sets the scope of the event, typically the fully qualified name of the emitting class.
-
setBody
public EventBuilder setBody(String body)
Sets the textual description of the event.
-
setSeverity
public EventBuilder setSeverity(String severity)
Sets the severity of the event, e.g. DEBUG, INFO, ...
-
setAttribute
public EventBuilder setAttribute(String key, String value)
Additional attribute to be attached to thisEvent.- Specified by:
setAttributein interfaceAttributeBuilder
-
setAttribute
public EventBuilder setAttribute(String key, long value)
Additional attribute to be attached to thisEvent.- Specified by:
setAttributein interfaceAttributeBuilder
-
setAttribute
public EventBuilder setAttribute(String key, double value)
Additional attribute to be attached to thisEvent.- Specified by:
setAttributein interfaceAttributeBuilder
-
setAttribute
public EventBuilder setAttribute(String key, boolean value)
Additional attribute to be attached to thisEvent.- Specified by:
setAttributein interfaceAttributeBuilder
-
getName
public String getName()
-
build
public Event build()
-
-