public static EvictionController create(EvictionAttributes evictionAttributes, boolean isOffHeap,
      StatisticsFactory statsFactory, String statsName) {
    EvictionAlgorithm algorithm = evictionAttributes.getAlgorithm();
    EvictionAction action = evictionAttributes.getAction();
    ObjectSizer sizer = evictionAttributes.getObjectSizer();
    int maximum = evictionAttributes.getMaximum();
    EvictionStats evictionStats;
    EvictionCounters evictionCounters;
    if (algorithm == EvictionAlgorithm.LRU_HEAP) {
      evictionStats = new HeapLRUStatistics(statsFactory, statsName);
      evictionCounters = new EvictionCountersImpl(evictionStats);
      return new HeapLRUController(evictionCounters, action, sizer, algorithm);
    }
    if (algorithm == EvictionAlgorithm.LRU_MEMORY || algorithm == EvictionAlgorithm.LIFO_MEMORY) {
      evictionStats = new MemoryLRUStatistics(statsFactory, statsName);
      evictionCounters = new EvictionCountersImpl(evictionStats);
      return new MemoryLRUController(evictionCounters, maximum, sizer, action, isOffHeap,
          algorithm);
    }
    if (algorithm == EvictionAlgorithm.LRU_ENTRY || algorithm == EvictionAlgorithm.LIFO_ENTRY) {
      evictionStats = new CountLRUStatistics(statsFactory, statsName);
      evictionCounters = new EvictionCountersImpl(evictionStats);
      return new CountLRUEviction(evictionCounters, maximum, action, algorithm);
    }

    throw new IllegalStateException("Unhandled algorithm " + algorithm);
  }
Create and return the appropriate eviction controller using the attributes provided.
geode-core/src/main/java/org/apache/geode/internal/cache/eviction/AbstractEvictionController.java