public interface Event
| Modifier and Type | Method and Description |
|---|---|
Event |
addSegment(java.lang.String key,
java.lang.String value)
Add one segmentation entry to this event
|
Event |
addSegments(java.lang.String... segmentation)
Set event segmentation from
|
void |
endAndRecord()
|
boolean |
isInvalid()
Whether event has been marked as invalid, meaning it won't be recorded
|
void |
record()
Add event to the buffer, send it to the server in case number of events in the session
is equal or bigger than
ConfigCore.eventsBufferSize or wait until next Session.update(). |
Event |
setCount(int count)
Overwrite default count=1 for this event
|
Event |
setDuration(double duration)
Set event duration
|
Event |
setSegmentation(java.util.Map<java.lang.String,java.lang.String> segmentation)
Set event segmentation from a map
|
Event |
setSum(double sum)
Set event sum
|
void record()
ConfigCore.eventsBufferSize or wait until next Session.update().void endAndRecord()
Event duration as difference between moment Event was created
and current time in seconds. Then add the event to its session (if they're enabled),
send it to the server in case number of events in the session is equal or bigger
than ConfigCore.eventsBufferSize or wait until next Session.update().Event addSegment(java.lang.String key, java.lang.String value)
key - key of segment, must not be null or emptyvalue - value of segment, must not be null or emptyEvent addSegments(java.lang.String... segmentation)
segmentation - set of strings in form of (key1, value1, key2, value2, ...) to set
segmentation from; cannot contain nulls or empty strings; must have
even lengthEvent setSegmentation(java.util.Map<java.lang.String,java.lang.String> segmentation)
segmentation - map of segment pairs ({key1: value1, key2: value2}Event setCount(int count)
count - event count, cannot be 0Event setSum(double sum)
sum - event sumEvent setDuration(double duration)
duration - event durationboolean isInvalid()
true if event has been invalidated due to: