|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<NotificationScope>
javax.cache.event.NotificationScope
public enum NotificationScope
This enumeration defines valid values for CacheEntryListener notification scope.
A distributed cache may contain multiple CacheManager nodes. Events on a cache instance inside
in the same JVM are considered local, other events are not.
CacheEntryListener with a remote notification scope.
Only those cluster members interested in receiving remote events should register such a listener.
There can be a large cost difference between receipt of local versus remote events thus allowing the choice.
Accordingly, the remote notification scope is optional. This capability can be determined using CacheManagerFactory.isSupported(javax.cache.OptionalFeature).
| Enum Constant Summary | |
|---|---|
LOCAL
Receive only events generated locally. |
|
REMOTE
Receive only events generated by another JVM |
|
| Method Summary | |
|---|---|
boolean |
shouldDeliver(boolean isRemote)
Determine whether an event should be delivered under this notification scope. |
static NotificationScope |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static NotificationScope[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final NotificationScope LOCAL
public static final NotificationScope REMOTE
| Method Detail |
|---|
public static NotificationScope[] values()
for (NotificationScope c : NotificationScope.values()) System.out.println(c);
public static NotificationScope valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is nullpublic boolean shouldDeliver(boolean isRemote)
isRemote - Whether the event is local or remote
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||