Top Description Fields Constructors Methods
net.sf.ehcache.event

public final Enum NotificationScope

extends Enum<NotificationScope>
Class Inheritance

This enumeration defines valid values for event listener notification scope. By default an event listener will be open to listening for events created on all nodes (ALL). You may also specify to receive only LOCAL events or only REMOTE events.
Author
Geert Bevin
Since
2.0

Field Summary

Modifier and TypeField and Description
public static final NotificationScope
ALL

Receive all events

private final boolean
private final boolean
public static final NotificationScope
LOCAL

Receive only events generated by this CacheManager

public static final NotificationScope
REMOTE

Receive only events generated by another CacheManager

Constructor Summary

AccessConstructor and Description
private
NotificationScope(boolean deliverLocal, boolean deliverRemote)

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

True if the event should be delivered to a listener with this notification scope
shouldDeliver
(boolean
Whether the event is local or remote
isRemote
)

Determine whether an event should be delivered under this notification scope.

public static NotificationScope
public static NotificationScope[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ALLback to summary
public static final NotificationScope ALL

Receive all events

deliverLocalback to summary
private final boolean deliverLocal
deliverRemoteback to summary
private final boolean deliverRemote
LOCALback to summary
public static final NotificationScope LOCAL

Receive only events generated by this CacheManager

REMOTEback to summary
public static final NotificationScope REMOTE

Receive only events generated by another CacheManager

Constructor Detail

NotificationScopeback to summary
private NotificationScope(boolean deliverLocal, boolean deliverRemote)

Method Detail

shouldDeliverback to summary
public boolean shouldDeliver(boolean isRemote)

Determine whether an event should be delivered under this notification scope.

Parameters
isRemote:boolean

Whether the event is local or remote

Returns:boolean

True if the event should be delivered to a listener with this notification scope

valueOfback to summary
public static NotificationScope valueOf(String name)
valuesback to summary
public static NotificationScope[] values()