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 (seeareMatch(java.lang.Object, java.lang.Object)
) as well as how to handle a duplication (seegetAction()
).
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
DuplicationStrategy.Action
The enumerated list of actions available on duplication match
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
areMatch(java.lang.Object listener, java.lang.Object original)
Are the two listener instances considered a duplication?DuplicationStrategy.Action
getAction()
How should a duplication be handled?
-
-
-
Method Detail
-
areMatch
boolean areMatch(java.lang.Object listener, java.lang.Object original)
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
-
-