Package org.hibernate.event.service.spi
Interface DuplicationStrategy
- All Known Implementing Classes:
DuplicationStrategyImpl
,EnversListenerDuplicationStrategy
public interface DuplicationStrategy
Defines listener duplication checking strategy, both in terms of when a duplication is detected (see
areMatch(java.lang.Object, java.lang.Object)
) as well as how to handle a duplication (see getAction()
).-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
The enumerated list of actions available on duplication match -
Method Summary
Modifier and TypeMethodDescriptionboolean
Are the two listener instances considered a duplication?How should a duplication be handled?
-
Method Details
-
areMatch
Are the two listener instances considered a duplication?- Parameters:
listener
- The listener we are currently trying to registeroriginal
- An already registered listener- Returns:
- true if the two instances are considered a duplication; false otherwise
-
getAction
DuplicationStrategy.Action getAction()How should a duplication be handled?- Returns:
- The strategy for handling duplication
-