public static class Event.BaseBuilder<T>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,java.lang.Boolean> |
booleanProperties |
protected java.util.Map<java.lang.String,java.util.Date> |
dateProperties |
protected java.util.Map<java.lang.String,java.lang.Double> |
doubleProperties |
protected long |
duration |
protected java.util.Map<java.lang.String,java.lang.Long> |
longProperties |
protected java.util.Map<java.lang.String,java.lang.String> |
stringProperties |
protected T |
thisObj |
protected long |
timestamp |
| Constructor and Description |
|---|
BaseBuilder() |
| Modifier and Type | Method and Description |
|---|---|
T |
addBooleanProperty(java.lang.String key,
boolean value) |
T |
addDateProperty(java.lang.String key,
java.util.Date value) |
T |
addDoubleProperty(java.lang.String key,
double value) |
T |
addLongProperty(java.lang.String key,
long value) |
T |
addStringProperty(java.lang.String key,
java.lang.String value) |
T |
clearBooleanProperties()
Clear all existing boolean properties
|
T |
clearDateProperties()
Clear all existing boolean properties
|
T |
clearDoubleProperties()
Clears all existing Double Properties
|
T |
clearLongProperties()
Clears all existing long properties
|
T |
clearStringProperties()
Clears all existing string properties
|
T |
removeBooleanProperty(java.lang.String key) |
T |
removeDateProperty(java.lang.String key) |
T |
removeDoubleProperty(java.lang.String key) |
T |
removeLongProperty(java.lang.String key) |
T |
removeStringProperty(java.lang.String key) |
T |
withDuration(long duration) |
T |
withTimestamp(long timestamp) |
protected T thisObj
protected long timestamp
protected long duration
protected final java.util.Map<java.lang.String,java.lang.String> stringProperties
protected final java.util.Map<java.lang.String,java.lang.Long> longProperties
protected final java.util.Map<java.lang.String,java.lang.Double> doubleProperties
protected final java.util.Map<java.lang.String,java.lang.Boolean> booleanProperties
protected final java.util.Map<java.lang.String,java.util.Date> dateProperties
public T withTimestamp(long timestamp)
timestamp - Timestamp when the event occurred or startedpublic T withDuration(long duration)
duration - Must be later than the timestamppublic T addStringProperty(java.lang.String key, java.lang.String value)
key - an identifier for the event property. Keys cannot contain the pipe character '|'.
e.g. "url"value - a String value for this key. e.g. "http://www.appdynamics.com"public T removeStringProperty(java.lang.String key)
key - an identifier for the event property.
If a key is not found, the call is a no-oppublic T clearStringProperties()
public T addLongProperty(java.lang.String key, long value)
key - an identifier for the event property. Keys cannot contain the pipe character '|'.
e.g. "responseCode"value - an int or long value for this key e.g. 200public T removeLongProperty(java.lang.String key)
key - an identifier for a long propertypublic T clearLongProperties()
public T addDoubleProperty(java.lang.String key, double value)
key - an identifier for the event property. Keys cannot contain the pipe character '|'.
e.g. "temperatureReading"value - a float value for this key e.g. 98.2public T removeDoubleProperty(java.lang.String key)
key - an identifier for the a float propertypublic T clearDoubleProperties()
public T addDateProperty(java.lang.String key, java.util.Date value)
key - an identifier for the event property. Keys cannot contain the pipe character '|'.
e.g. "deviceBootUpTime"value - a Date value for this key e.g. 1487119625012public T removeDateProperty(java.lang.String key)
key - an identifier for the DataPropertypublic T clearDateProperties()
public T addBooleanProperty(java.lang.String key, boolean value)
key - an identifier for the event property. Keys cannot contain the pipe character '|'.
e.g. "boilerOn"value - a boolean value for this key e.g. falsepublic T removeBooleanProperty(java.lang.String key)
key - a key for a boolean propertypublic T clearBooleanProperties()