Class PartitionListenerAdapter

java.lang.Object
org.apache.geode.cache.partition.PartitionListenerAdapter
All Implemented Interfaces:
PartitionListener

public class PartitionListenerAdapter extends Object implements PartitionListener

Utility class that implements all methods in PartitionListener with empty implementations. Applications can subclass this class and only override the methods of interest.

Subclasses declared in a Cache XML file, it must also implement Declarable

Note : Please request help on the Geode developer mailing list (dev@geode.apache.org) before using these APIs.

Since:
GemFire 6.6.2
  • Constructor Details

    • PartitionListenerAdapter

      public PartitionListenerAdapter()
  • Method Details

    • afterPrimary

      public void afterPrimary(int bucketId)
      Description copied from interface: PartitionListener
      Callback invoked when any bucket in a partitioned region becomes primary
      Specified by:
      afterPrimary in interface PartitionListener
      Parameters:
      bucketId - id of the bucket which became primary
    • afterRegionCreate

      public void afterRegionCreate(Region<?,?> region)
      Description copied from interface: PartitionListener
      Callback invoked when a partition region is created
      Specified by:
      afterRegionCreate in interface PartitionListener
      Parameters:
      region - handle of the region which is created
    • afterBucketRemoved

      public void afterBucketRemoved(int bucketId, Iterable<?> keys)
      Description copied from interface: PartitionListener
      Callback invoked after a bucket has been removed from a member (e.g. during rebalancing). This API is useful for maintaining external data structures by bucket id or key.
      Specified by:
      afterBucketRemoved in interface PartitionListener
      Parameters:
      bucketId - id of the bucket removed
      keys - keys in the bucket removed
    • afterBucketCreated

      public void afterBucketCreated(int bucketId, Iterable<?> keys)
      Description copied from interface: PartitionListener
      Callback invoked after a bucket has been created in a member (e.g. during rebalancing). This API is useful for maintaining external data structures by bucket id or key. Note that this API is invoked after the initial image has been completed so creates and destroys may occur in the keys. It is best to use this API during periods of no cache activity.
      Specified by:
      afterBucketCreated in interface PartitionListener
      Parameters:
      bucketId - id of the bucket created
      keys - keys in the bucket created