public abstract class AbstractEvent extends Object implements Event
Event implementation can be used as a base event to inherit from.Event.Category, Event.SeverityCATEGORY_PREFIX| Modifier | Constructor and Description |
|---|---|
protected |
AbstractEvent(Event.Severity severity,
Event.Category category,
Duration duration,
Context context) |
protected |
AbstractEvent(Event.Severity severity,
String category,
Duration duration,
Context context)
Creates a new abstract event.
|
| Modifier and Type | Method and Description |
|---|---|
String |
category()
The Category of this event.
|
Context |
context()
The context this event is referencing.
|
Instant |
created()
Returns the creation timestamp of this event.
|
long |
createdAt()
Returns the value of
System.nanoTime() when the event was created. |
Duration |
duration()
Returns the duration of this event.
|
Event.Severity |
severity()
The Severity of this event.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcause, descriptionprotected AbstractEvent(Event.Severity severity, Event.Category category, Duration duration, Context context)
protected AbstractEvent(Event.Severity severity, String category, Duration duration, Context context)
severity - the severity to use.category - the category to use.duration - the duration for this event.context - the context if provided.public Event.Severity severity()
Eventpublic String category()
Eventpublic Duration duration()
Eventpublic Context context()
Eventpublic long createdAt()
EventSystem.nanoTime() when the event was created.public Instant created()
EventCopyright © 2024 Couchbase, Inc.. All rights reserved.