public static void main1(String[] args) throws Exception {
    DistributedSystem system = DistributedSystem.connect(new java.util.Properties());
    Cache cache = CacheFactory.create(system);
    AttributesFactory factory = new AttributesFactory();
    factory.setEvictionAttributes(EvictionAttributes.createLRUMemoryAttributes(2,
        null, EvictionAction.OVERFLOW_TO_DISK));
    factory.setCacheListener(new CacheListenerAdapter() {
      @Override
      public void afterUpdate(EntryEvent event) {
        System.out.println("UPDATE: " + event.getKey() + " -> (" + event.getOldValue() + " -> "
            + event.getNewValue() + ")");
      }
    });

    LocalRegion region = (LocalRegion) cache.createRegion("TestDiskRegion", factory.create());
    DiskRegion dr = region.getDiskRegion();
    DiskRegionStats diskStats = dr.getStats();
    EvictionCounters lruStats = getLRUStats(region);

    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    System.out.println("Hit enter to perform action");
    for (int i = 0; true; i++) {
      br.readLine();
      // Thread.sleep(500);
      Object key = i;
      Object value = new byte[200000];
      region.put(key, value);
      System.out.println(key + " -> " + value + " evictions = " + lruStats.getEvictions()
          + ", writes = " + diskStats.getWrites());
    }
  }
Returns the <code>EvictionStatistics</code> for the given region
geode-core/src/test/java/org/apache/geode/cache30/TestDiskRegion.java