Package com.lightbend.cinnamon.event
Class EventBackend
- java.lang.Object
-
- com.lightbend.cinnamon.event.EventBackend
-
public abstract class EventBackend extends java.lang.ObjectEventBackendabstraction to create events for instrumented entities.
-
-
Field Summary
Fields Modifier and Type Field Description static EventBackendNONEEmpty no-opEventBackend.
-
Constructor Summary
Constructors Constructor Description EventBackend()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract EventFactoryeventsFor(Identity identity)Create anEventFactoryfor an instrumented entity with the givenIdentity.booleanusesIdentity()Override and set to false if the event backend doesn't use the identity.
-
-
-
Field Detail
-
NONE
public static final EventBackend NONE
Empty no-opEventBackend.
-
-
Method Detail
-
eventsFor
public abstract EventFactory eventsFor(Identity identity)
Create anEventFactoryfor an instrumented entity with the givenIdentity.- Parameters:
identity- identity of instrumented event- Returns:
- event factory for the instrumented entity
-
usesIdentity
public boolean usesIdentity()
Override and set to false if the event backend doesn't use the identity. This will avoid creating multiple events for multiple identities.- Returns:
- whether this event backend uses the identity
-
-