@Override
  public EntryExpiryTask getEntryExpiryTask(Object key) {
    RegionEntry re = getRegionEntry(key);
    if (re == null) {
      throw new EntryNotFoundException("Entry for key " + key + " does not exist.");
    }
    return entryExpiryTasks.get(re);
  }
If custom expiration returns non-null expiration attributes then create a CustomEntryExpiryTask
for this region and the given entry and return it. Otherwise if the region is configured for
expiration then create an EntryExpiryTask for this region and the given entry and return it.
Null is returned if the expiration attributes indicate that expiration is disabled.
geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java