Package com.oracle.coherence.repository
Interface AbstractRepositoryBase.Listener<T>
- Type Parameters:
T
- the entity type
- Enclosing class:
AbstractRepositoryBase<ID,
T, M>
public static interface AbstractRepositoryBase.Listener<T>
An interface that should be implemented by the clients interested in
repository events.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
A builder for a simple, lambda-basedAbstractRepositoryBase.Listener
. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> AbstractRepositoryBase.Listener.Builder
<T> builder()
Create newAbstractRepositoryBase.Listener.Builder
instance.default void
onInserted
(T entity) An event callback that will be called when a new entity is inserted into the repository.default void
An event callback that will be called when an entity is removed from the repository.default void
An event callback that will be called when an entity is updated.
-
Method Details
-
onInserted
An event callback that will be called when a new entity is inserted into the repository.- Parameters:
entity
- inserted entity
-
onUpdated
An event callback that will be called when an entity is updated.- Parameters:
oldEntity
- previous entitynewEntity
- new entity
-
onRemoved
An event callback that will be called when an entity is removed from the repository.- Parameters:
entity
- removed entity
-
builder
Create newAbstractRepositoryBase.Listener.Builder
instance.- Type Parameters:
T
- the entity type- Returns:
- a new
AbstractRepositoryBase.Listener.Builder
instance
-