protected class ContinuousQueryCache.ServiceListener extends Object implements MemberListener
MemberListener for the underlying cache's service.
The primary goal of that listener is invalidation of the
ContinuousQueryCache in case of the corresponding CacheService
[automatic] restart.
| Modifier | Constructor and Description |
|---|---|
protected |
ServiceListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
memberJoined(MemberEvent evt)
Invoked when a Member has joined the service.
|
void |
memberLeaving(MemberEvent evt)
Invoked when a Member is leaving the service.
|
void |
memberLeft(MemberEvent evt)
Invoked when a Member has left the service.
|
String |
toString()
Produce a human-readable description of this object.
|
public void memberJoined(MemberEvent evt)
MemberListener
Note: this event could be called during the service restart on the
local node (evt.isLocal()) in which
case the listener's code should not attempt to use any clustered
cache or service functionality.
The most critical situation arises when a number of threads are waiting for a local service restart, being blocked by a Service object synchronization monitor. Since the Joined event should be fired only once, it is called on an event dispatcher thread while holding a synchronization monitor. An attempt to use other clustered service functionality during this local event notification may result in a deadlock.
memberJoined in interface MemberListenerevt - the MemberEvent.MEMBER_JOINED eventpublic void memberLeaving(MemberEvent evt)
MemberListenermemberLeaving in interface MemberListenerevt - the MemberEvent.MEMBER_LEAVING eventpublic void memberLeft(MemberEvent evt)
MemberListener
Note: this event could be called during the service restart on the
local node (evt.isLocal()) in which
case the listener's code should not attempt to use any clustered
cache or service functionality.
memberLeft in interface MemberListenerevt - the MemberEvent.MEMBER_LEFT event