Class RegionMembershipListenerAdapter<K,V>

java.lang.Object
org.apache.geode.cache.util.CacheListenerAdapter<K,V>
org.apache.geode.cache.util.RegionMembershipListenerAdapter<K,V>
All Implemented Interfaces:
CacheCallback, CacheListener<K,V>, Declarable, RegionMembershipListener<K,V>
Direct Known Subclasses:
RegionRoleListenerAdapter

public abstract class RegionMembershipListenerAdapter<K,V> extends CacheListenerAdapter<K,V> implements RegionMembershipListener<K,V>
Utility class that implements all methods in RegionMembershipListener with empty implementations. Applications can subclass this class and only override the methods for the events of interest.
Since:
GemFire 5.0
  • Constructor Details

    • RegionMembershipListenerAdapter

      public RegionMembershipListenerAdapter()
  • Method Details

    • initialMembers

      public void initialMembers(Region<K,V> r, DistributedMember[] initialMembers)
      Description copied from interface: RegionMembershipListener
      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.
      Specified by:
      initialMembers in interface RegionMembershipListener<K,V>
      Parameters:
      r - the Region the listener is registered on
      initialMembers - an array of the other members that have this region at the time this listener is added.
    • afterRemoteRegionCreate

      public void afterRemoteRegionCreate(RegionEvent<K,V> event)
      Description copied from interface: RegionMembershipListener
      Invoked when another member has created the distributed region this listener is on.
      Specified by:
      afterRemoteRegionCreate in interface RegionMembershipListener<K,V>
      Parameters:
      event - the event from the member whose region was created.
    • afterRemoteRegionDeparture

      public void afterRemoteRegionDeparture(RegionEvent<K,V> event)
      Description copied from interface: RegionMembershipListener
      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.
      Specified by:
      afterRemoteRegionDeparture in interface RegionMembershipListener<K,V>
      Parameters:
      event - the event from the member whose region is no longer available.
    • afterRemoteRegionCrash

      public void afterRemoteRegionCrash(RegionEvent<K,V> event)
      Description copied from interface: RegionMembershipListener
      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.

      Specified by:
      afterRemoteRegionCrash in interface RegionMembershipListener<K,V>
      Parameters:
      event - the event from the member whose region is no longer available.