Package io.atomix.utils.event
Class AbstractEvent<T extends Enum,S>
java.lang.Object
io.atomix.utils.event.AbstractEvent<T,S>
- All Implemented Interfaces:
Event<T,S>
Base event implementation.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractEvent(T type, S subject) Creates an event of a given type and for the specified subject and the current time.protectedAbstractEvent(T type, S subject, long time) Creates an event of a given type and for the specified subject and time. -
Method Summary
-
Constructor Details
-
AbstractEvent
Creates an event of a given type and for the specified subject and the current time.- Parameters:
type- event typesubject- event subject
-
AbstractEvent
Creates an event of a given type and for the specified subject and time.- Parameters:
type- event typesubject- event subjecttime- occurrence time
-
-
Method Details
-
time
public long time()Description copied from interface:EventReturns the timestamp of when the event occurred, given in milliseconds since the start of epoch. -
type
Description copied from interface:EventReturns the type of the event. -
subject
Description copied from interface:EventReturns the subject of the event. -
toString
-