Package org.apache.geode.cache
Interface RegionMembershipListener<K,V>
- All Superinterfaces:
CacheCallback,CacheListener<K,,V> Declarable
- All Known Implementing Classes:
RegionMembershipListenerAdapter,RegionRoleListenerAdapter
A listener that can be implemented to handle region membership events.
Instead of implementing this interface it is recommended that you extend the
RegionMembershipListenerAdapter class.
- Since:
- GemFire 5.0
- See Also:
-
AttributesFactory.addCacheListener(org.apache.geode.cache.CacheListener<K, V>)AttributesFactory.initCacheListeners(org.apache.geode.cache.CacheListener<K, V>[])RegionAttributes.getCacheListeners()AttributesMutator.addCacheListener(org.apache.geode.cache.CacheListener<K, V>)AttributesMutator.removeCacheListener(org.apache.geode.cache.CacheListener<K, V>)AttributesMutator.initCacheListeners(org.apache.geode.cache.CacheListener<K, V>[])
-
Method Summary
Modifier and TypeMethodDescriptionvoidafterRemoteRegionCrash(RegionEvent<K, V> event) Invoked when another member's distributed region is no longer available to this cache because the member has crashed or is no longer reachable on the network.voidafterRemoteRegionCreate(RegionEvent<K, V> event) Invoked when another member has created the distributed region this listener is on.voidafterRemoteRegionDeparture(RegionEvent<K, V> event) Invoked when another member's distributed region is no longer available to this cache due to normal operations.voidinitialMembers(Region<K, V> region, DistributedMember[] initialMembers) Invoked when the listener is first initialized and is given the set of members that have the region created at that time.Methods inherited from interface org.apache.geode.cache.CacheCallback
closeMethods inherited from interface org.apache.geode.cache.CacheListener
afterCreate, afterDestroy, afterInvalidate, afterRegionClear, afterRegionCreate, afterRegionDestroy, afterRegionInvalidate, afterRegionLive, afterUpdateMethods inherited from interface org.apache.geode.cache.Declarable
init, initialize
-
Method Details
-
initialMembers
Invoked when the listener is first initialized and is given the set of members that have the region created at that time. The listener is initialized when:- the region is created with an already added listener
- a listener is added using the
AttributesMutator.
- Parameters:
region- theRegionthe listener is registered oninitialMembers- an array of the other members that have this region at the time this listener is added.
-
afterRemoteRegionCreate
Invoked when another member has created the distributed region this listener is on.- Parameters:
event- the event from the member whose region was created.
-
afterRemoteRegionDeparture
Invoked when another member's distributed region is no longer available to this cache due to normal operations. This can be triggered by one of the following methods: This differs from afterRemoteRegionCrash notification in that the departed member performed an action either to remove its region or to close its region or cache.- Parameters:
event- the event from the member whose region is no longer available.
-
afterRemoteRegionCrash
Invoked when another member's distributed region is no longer available to this cache because the member has crashed or is no longer reachable on the network.- Parameters:
event- the event from the member whose region is no longer available.
-