public static EvictionAttributes createLRUHeapAttributes() {
    return new EvictionAttributesImpl().setAlgorithm(EvictionAlgorithm.LRU_HEAP)
        .setAction(EvictionAction.DEFAULT_EVICTION_ACTION).setObjectSizer(ObjectSizer.DEFAULT);
  }
Creates and returns {@linkplain EvictionAlgorithm#LRU_HEAP heap LRU} eviction attributes with
default {@linkplain EvictionAction#DEFAULT_EVICTION_ACTION action} and default
{@linkplain ObjectSizer#DEFAULT sizer}.
<p>
Heap LRU EvictionAttributes evict the least recently used {@link Region.Entry} when heap usage
exceeds the {@link ResourceManager} eviction heap threshold. If the eviction heap threshold is
exceeded the least recently used {@link Region.Entry}s are evicted.
<p>
With other LRU-based eviction controllers, only cache actions (such as
{@link Region#put(Object, Object) puts} and {@link Region#get(Object) gets}) cause the LRU
entry to be evicted. However, with heap LRU, because the JVM's heap may be effected by more
than just the GemFire cache operations, a daemon thread will perform the eviction if no
operations are being done on the region.
<p>
The eviction attribute's {@linkplain ObjectSizer sizer} is used to estimate how much the heap
will be reduced by an eviction.
<p>
When using Heap LRU, the JVM must be launched with the <code>-Xmx</code> and <code>-Xms</code>
switches set to the same values. Many virtual machine implementations have additional JVM
switches to control the behavior of the garbage collector. We suggest that you investigate
tuning the garbage collector when using this type of eviction controller. A collector that
frequently collects is needed to keep our heap usage up to date. In particular, on the Sun
<A href="http://java.sun.com/docs/hotspot/gc/index.html">HotSpot</a> JVM,
before Java 14,
the <code>-XX:+UseConcMarkSweepGC</code> flag needs to be set, and
<code>-XX:CMSInitiatingOccupancyFraction=N</code> should be set with N being a percentage that
is less than the {@link ResourceManager} eviction heap threshold.
<p>
The JRockit JVM has similar flags, <code>-Xgc:gencon</code> and <code>-XXgcTrigger:N</code>,
which are required if using this LRU algorithm. Please Note: the JRockit gcTrigger flag is
based on heap free, not heap in use like the GemFire parameter. This means you need to set
gcTrigger to 100-N. for example, if your eviction threshold is 30 percent, you will need to set
gcTrigger to 70 percent.
<p>
On the IBM JVM, the flag to get a similar collector is <code>-Xgcpolicy:gencon</code>, but
there is no corollary to the gcTrigger/CMSInitiatingOccupancyFraction flags, so when using this
feature with an IBM JVM, the heap usage statistics might lag the true memory usage of the JVM,
and thresholds may need to be set sufficiently high that the JVM will initiate GC before the
thresholds are crossed.
<p>
If you are using a <code>cache.xml</code> file to create a Cache Region declaratively, you can
include the following to create an LRU heap eviction controller:

<pre>
        &lt;region-attributes&gt;
           &lt;eviction-attributes&gt;
              &lt;lru-heap-percentage action=&quot;local-destroy&quot;
           &lt;/eviction-attributes&gt;
        &lt;/region-attributes&gt;
</pre>
<p>

@return {@linkplain EvictionAlgorithm#LRU_HEAP heap LRU} eviction attributes with default
        {@linkplain EvictionAction#DEFAULT_EVICTION_ACTION action} and default
        {@linkplain ObjectSizer#DEFAULT sizer}
geode-core/src/main/java/org/apache/geode/cache/EvictionAttributes.java