public PartitionAttributesFactory<K, V> addPartitionListener(PartitionListener listener) {
    if (listener == null) {
      throw new IllegalArgumentException(
          "PartitionListner parameter was null");
    }
    synchronized (partitionAttributes) {
      partitionAttributes.addPartitionListener(listener);
    }
    return this;
  }
adds a PartitionListener for the partitioned region.

@param listener the PartitionListener to add
@return PartitionAttributeFactory.
@since GemFire 6.5
geode-core/src/main/java/org/apache/geode/cache/PartitionAttributesFactory.java