Package com.yahoo.log.event
Class Event
java.lang.Object
com.yahoo.log.event.Event
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Collection
,Count
,CountGroup
,Crash
,Histogram
,Progress
,Reloaded
,Reloading
,Started
,Starting
,State
,Stopped
,Stopping
,Unknown
,Value
,ValueGroup
@Deprecated(forRemoval=true,
since="7")
public abstract class Event
extends Object
implements Serializable
Deprecated, for removal: This API element is subject to removal in a future version.
Only for internal Vespa usage
The Event class is the base class for all VESPA defined events.
All specific Event classes extend this abstract class. An event
is more or less a type and a set of properties. For convenience
we use the logging system to transport Event instances, so the
typical use is to serialize events into the payload of log
messages.
Note that the static methods started(), stopped() etc are for use with this class so using them in the subclasses isn't really sanctioned. These methods are what the user wants to use for logging events, rather than making events him/herself and stuffing them through the logging API.
- Author:
- Bjorn Borud
- See Also:
-
Constructor Summary
ModifierConstructorDescriptionprotected
Event()
Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionstatic final void
Deprecated, for removal: This API element is subject to removal in a future version.Static method for logging the count event.static final void
countGroup
(String name, String value) Deprecated, for removal: This API element is subject to removal in a future version.Static method for logging a set of count events.static final void
Deprecated, for removal: This API element is subject to removal in a future version.Static method for logging the crash event.getName()
Deprecated, for removal: This API element is subject to removal in a future version.Get the name of the event instance.long
getTime()
Deprecated, for removal: This API element is subject to removal in a future version.Get the timestamp of this eventDeprecated, for removal: This API element is subject to removal in a future version.Get a property value.getValuePossiblyQuote
(String name) Deprecated, for removal: This API element is subject to removal in a future version.Convenience method which returns a property.int
Deprecated, for removal: This API element is subject to removal in a future version.Get the event version.static final void
Deprecated, for removal: This API element is subject to removal in a future version.Static method for logging the histogram event.static Event
Deprecated, for removal: This API element is subject to removal in a future version.Parse string representation of Event and emit correct Event subtype.static final void
Deprecated, for removal: This API element is subject to removal in a future version.Static method for logging the progress event.static final void
Deprecated, for removal: This API element is subject to removal in a future version.Static method for logging the reloaded event.static final void
Deprecated, for removal: This API element is subject to removal in a future version.Static method for logging the reloading event.void
setTime
(long time) Deprecated, for removal: This API element is subject to removal in a future version.Set the timestamp of this event.Deprecated, for removal: This API element is subject to removal in a future version.Set a property.setVersion
(int version) Deprecated, for removal: This API element is subject to removal in a future version.Set event versionstatic final void
Deprecated, for removal: This API element is subject to removal in a future version.Static method for logging the started event.static final void
Deprecated, for removal: This API element is subject to removal in a future version.Static method for logging the starting event.static final void
Deprecated, for removal: This API element is subject to removal in a future version.Static method for logging the state event.static final void
Deprecated, for removal: This API element is subject to removal in a future version.Static method for logging the stopped event.static final void
Deprecated, for removal: This API element is subject to removal in a future version.Static method for logging the stopping event.toString()
Deprecated, for removal: This API element is subject to removal in a future version.This method returns the string representation of the event and must return something that can be parsed by the parse method.static final void
Deprecated, for removal: This API element is subject to removal in a future version.Static method for logging the value event.static final void
valueGroup
(String name, String value) Deprecated, for removal: This API element is subject to removal in a future version.Static method for logging a set of value events.
-
Constructor Details
-
Event
protected Event()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
setValue
Deprecated, for removal: This API element is subject to removal in a future version.Set a property.- Parameters:
name
- The name of the propertyvalue
- The value of the property
-
getValue
Deprecated, for removal: This API element is subject to removal in a future version.Get a property value. -
setTime
public void setTime(long time) Deprecated, for removal: This API element is subject to removal in a future version.Set the timestamp of this event. -
getTime
public long getTime()Deprecated, for removal: This API element is subject to removal in a future version.Get the timestamp of this event- Returns:
- returns the timestamp of this event
-
setVersion
Deprecated, for removal: This API element is subject to removal in a future version.Set event version- Parameters:
version
- The version of the event.
-
getVersion
public int getVersion()Deprecated, for removal: This API element is subject to removal in a future version.Get the event version.- Returns:
- event version
-
getValuePossiblyQuote
Deprecated, for removal: This API element is subject to removal in a future version.Convenience method which returns a property. If the property contains whitespace the property will be enclosed in quotes. FIXME: quotes inside the value are not quoted -
getName
Deprecated, for removal: This API element is subject to removal in a future version.Get the name of the event instance.- Returns:
- the name of the event instance.
-
toString
Deprecated, for removal: This API element is subject to removal in a future version.This method returns the string representation of the event and must return something that can be parsed by the parse method. -
parse
Deprecated, for removal: This API element is subject to removal in a future version.Parse string representation of Event and emit correct Event subtype.- Parameters:
s
- A string containing an event- Returns:
- Event represented by
s
. - Throws:
MalformedEventException
- if unable to deciper Event from string.
-
starting
Deprecated, for removal: This API element is subject to removal in a future version.Static method for logging the starting event. -
started
Deprecated, for removal: This API element is subject to removal in a future version.Static method for logging the started event. -
stopping
Deprecated, for removal: This API element is subject to removal in a future version.Static method for logging the stopping event. -
stopped
Deprecated, for removal: This API element is subject to removal in a future version.Static method for logging the stopped event. -
reloading
Deprecated, for removal: This API element is subject to removal in a future version.Static method for logging the reloading event. -
reloaded
Deprecated, for removal: This API element is subject to removal in a future version.Static method for logging the reloaded event. -
count
Deprecated, for removal: This API element is subject to removal in a future version.Static method for logging the count event. -
value
Deprecated, for removal: This API element is subject to removal in a future version.Static method for logging the value event. -
histogram
Deprecated, for removal: This API element is subject to removal in a future version.Static method for logging the histogram event. -
valueGroup
Deprecated, for removal: This API element is subject to removal in a future version.Static method for logging a set of value events. -
countGroup
Deprecated, for removal: This API element is subject to removal in a future version.Static method for logging a set of count events. -
progress
Deprecated, for removal: This API element is subject to removal in a future version.Static method for logging the progress event. -
state
Deprecated, for removal: This API element is subject to removal in a future version.Static method for logging the state event. -
crash
Deprecated, for removal: This API element is subject to removal in a future version.Static method for logging the crash event.
-