Package org.infinispan.notifications
Enum Listener.Observation
- All Implemented Interfaces:
Serializable
,Comparable<Listener.Observation>
- Enclosing class:
Listener
Enumeration that defines when a listener event can be observed. A listener can receive an event before and/or
after an operation has occurred. If the user wishes to be notified just before the operation completes
the listener should observe using
PRE
level. If the user wishes to be notified only
after the operation completes the listener should observe using POST
level. If the user
wishes to have an event before and after they should observe using BOTH
level.-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
shouldInvoke
(boolean pre) static Listener.Observation
Returns the enum constant of this type with the specified name.static Listener.Observation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
PRE
Observation level used to only be notified of an operation before it completes -
POST
Observation level used to only be notified of an operation after it has completed -
BOTH
Observation level used to be notified of an operation before and after it occurs
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
shouldInvoke
public abstract boolean shouldInvoke(boolean pre)
-