public abstract class AbstractEvent extends Object implements Event
Event
implementation can be used as a base event to inherit from.Event.Category, Event.Severity
CATEGORY_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, wait
cause, description
protected 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()
Event
public String category()
Event
public Duration duration()
Event
public Context context()
Event
public long createdAt()
Event
System.nanoTime()
when the event was created.public Instant created()
Event
Copyright © 2024 Couchbase, Inc.. All rights reserved.