All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.benmanes.caffeine.cache.LocalCacheFactory Maven / Gradle / Ivy

There is a newer version: 4.15.102
Show newest version
// Copyright 2016 Ben Manes. All Rights Reserved.
package com.github.benmanes.caffeine.cache;

import com.github.benmanes.caffeine.base.UnsafeAccess;
import com.github.benmanes.caffeine.cache.stats.StatsCounter;
import java.lang.IllegalStateException;
import java.lang.Runnable;
import java.lang.StringBuilder;
import java.lang.SuppressWarnings;
import java.lang.ref.ReferenceQueue;

/**
 * WARNING: GENERATED CODE
 *
 * A factory for caches optimized for a particular configuration.
 *
 * @author [email protected] (Ben Manes)
 */
@SuppressWarnings({"unchecked", "unused", "PMD"})
final class LocalCacheFactory {
  /**
   * Returns a cache optimized for this configuration.
   */
  static  BoundedLocalCache newBoundedLocalCache(Caffeine builder, CacheLoader cacheLoader, boolean async) {
    StringBuilder sb = new StringBuilder();
    if (builder.isStrongKeys()) {
      sb.append('S');
    } else {
      sb.append('W');
    }
    if (builder.isStrongValues()) {
      sb.append('S');
    } else {
      sb.append('I');
    }
    if (builder.removalListener != null) {
      sb.append("Li");
    }
    if (builder.isRecordingStats()) {
      sb.append('S');
    }
    if (builder.evicts()) {
      sb.append('M');
      if (builder.isWeighted()) {
        sb.append('W');
      } else {
        sb.append('S');
      }
    }
    if (builder.expiresAfterAccess()) {
      sb.append('A');
    }
    if (builder.expiresAfterWrite()) {
      sb.append('W');
    }
    if (builder.refreshes()) {
      sb.append('R');
    }
    switch (sb.toString()) {
      case "SI": return new SI<>(builder, cacheLoader, async);
      case "SIA": return new SIA<>(builder, cacheLoader, async);
      case "SIAR": return new SIAR<>(builder, cacheLoader, async);
      case "SIAW": return new SIAW<>(builder, cacheLoader, async);
      case "SIAWR": return new SIAWR<>(builder, cacheLoader, async);
      case "SILi": return new SILi<>(builder, cacheLoader, async);
      case "SILiA": return new SILiA<>(builder, cacheLoader, async);
      case "SILiAR": return new SILiAR<>(builder, cacheLoader, async);
      case "SILiAW": return new SILiAW<>(builder, cacheLoader, async);
      case "SILiAWR": return new SILiAWR<>(builder, cacheLoader, async);
      case "SILiMS": return new SILiMS<>(builder, cacheLoader, async);
      case "SILiMSA": return new SILiMSA<>(builder, cacheLoader, async);
      case "SILiMSAR": return new SILiMSAR<>(builder, cacheLoader, async);
      case "SILiMSAW": return new SILiMSAW<>(builder, cacheLoader, async);
      case "SILiMSAWR": return new SILiMSAWR<>(builder, cacheLoader, async);
      case "SILiMSR": return new SILiMSR<>(builder, cacheLoader, async);
      case "SILiMSW": return new SILiMSW<>(builder, cacheLoader, async);
      case "SILiMSWR": return new SILiMSWR<>(builder, cacheLoader, async);
      case "SILiMW": return new SILiMW<>(builder, cacheLoader, async);
      case "SILiMWA": return new SILiMWA<>(builder, cacheLoader, async);
      case "SILiMWAR": return new SILiMWAR<>(builder, cacheLoader, async);
      case "SILiMWAW": return new SILiMWAW<>(builder, cacheLoader, async);
      case "SILiMWAWR": return new SILiMWAWR<>(builder, cacheLoader, async);
      case "SILiMWR": return new SILiMWR<>(builder, cacheLoader, async);
      case "SILiMWW": return new SILiMWW<>(builder, cacheLoader, async);
      case "SILiMWWR": return new SILiMWWR<>(builder, cacheLoader, async);
      case "SILiR": return new SILiR<>(builder, cacheLoader, async);
      case "SILiS": return new SILiS<>(builder, cacheLoader, async);
      case "SILiSA": return new SILiSA<>(builder, cacheLoader, async);
      case "SILiSAR": return new SILiSAR<>(builder, cacheLoader, async);
      case "SILiSAW": return new SILiSAW<>(builder, cacheLoader, async);
      case "SILiSAWR": return new SILiSAWR<>(builder, cacheLoader, async);
      case "SILiSMS": return new SILiSMS<>(builder, cacheLoader, async);
      case "SILiSMSA": return new SILiSMSA<>(builder, cacheLoader, async);
      case "SILiSMSAR": return new SILiSMSAR<>(builder, cacheLoader, async);
      case "SILiSMSAW": return new SILiSMSAW<>(builder, cacheLoader, async);
      case "SILiSMSAWR": return new SILiSMSAWR<>(builder, cacheLoader, async);
      case "SILiSMSR": return new SILiSMSR<>(builder, cacheLoader, async);
      case "SILiSMSW": return new SILiSMSW<>(builder, cacheLoader, async);
      case "SILiSMSWR": return new SILiSMSWR<>(builder, cacheLoader, async);
      case "SILiSMW": return new SILiSMW<>(builder, cacheLoader, async);
      case "SILiSMWA": return new SILiSMWA<>(builder, cacheLoader, async);
      case "SILiSMWAR": return new SILiSMWAR<>(builder, cacheLoader, async);
      case "SILiSMWAW": return new SILiSMWAW<>(builder, cacheLoader, async);
      case "SILiSMWAWR": return new SILiSMWAWR<>(builder, cacheLoader, async);
      case "SILiSMWR": return new SILiSMWR<>(builder, cacheLoader, async);
      case "SILiSMWW": return new SILiSMWW<>(builder, cacheLoader, async);
      case "SILiSMWWR": return new SILiSMWWR<>(builder, cacheLoader, async);
      case "SILiSR": return new SILiSR<>(builder, cacheLoader, async);
      case "SILiSW": return new SILiSW<>(builder, cacheLoader, async);
      case "SILiSWR": return new SILiSWR<>(builder, cacheLoader, async);
      case "SILiW": return new SILiW<>(builder, cacheLoader, async);
      case "SILiWR": return new SILiWR<>(builder, cacheLoader, async);
      case "SIMS": return new SIMS<>(builder, cacheLoader, async);
      case "SIMSA": return new SIMSA<>(builder, cacheLoader, async);
      case "SIMSAR": return new SIMSAR<>(builder, cacheLoader, async);
      case "SIMSAW": return new SIMSAW<>(builder, cacheLoader, async);
      case "SIMSAWR": return new SIMSAWR<>(builder, cacheLoader, async);
      case "SIMSR": return new SIMSR<>(builder, cacheLoader, async);
      case "SIMSW": return new SIMSW<>(builder, cacheLoader, async);
      case "SIMSWR": return new SIMSWR<>(builder, cacheLoader, async);
      case "SIMW": return new SIMW<>(builder, cacheLoader, async);
      case "SIMWA": return new SIMWA<>(builder, cacheLoader, async);
      case "SIMWAR": return new SIMWAR<>(builder, cacheLoader, async);
      case "SIMWAW": return new SIMWAW<>(builder, cacheLoader, async);
      case "SIMWAWR": return new SIMWAWR<>(builder, cacheLoader, async);
      case "SIMWR": return new SIMWR<>(builder, cacheLoader, async);
      case "SIMWW": return new SIMWW<>(builder, cacheLoader, async);
      case "SIMWWR": return new SIMWWR<>(builder, cacheLoader, async);
      case "SIR": return new SIR<>(builder, cacheLoader, async);
      case "SIS": return new SIS<>(builder, cacheLoader, async);
      case "SISA": return new SISA<>(builder, cacheLoader, async);
      case "SISAR": return new SISAR<>(builder, cacheLoader, async);
      case "SISAW": return new SISAW<>(builder, cacheLoader, async);
      case "SISAWR": return new SISAWR<>(builder, cacheLoader, async);
      case "SISMS": return new SISMS<>(builder, cacheLoader, async);
      case "SISMSA": return new SISMSA<>(builder, cacheLoader, async);
      case "SISMSAR": return new SISMSAR<>(builder, cacheLoader, async);
      case "SISMSAW": return new SISMSAW<>(builder, cacheLoader, async);
      case "SISMSAWR": return new SISMSAWR<>(builder, cacheLoader, async);
      case "SISMSR": return new SISMSR<>(builder, cacheLoader, async);
      case "SISMSW": return new SISMSW<>(builder, cacheLoader, async);
      case "SISMSWR": return new SISMSWR<>(builder, cacheLoader, async);
      case "SISMW": return new SISMW<>(builder, cacheLoader, async);
      case "SISMWA": return new SISMWA<>(builder, cacheLoader, async);
      case "SISMWAR": return new SISMWAR<>(builder, cacheLoader, async);
      case "SISMWAW": return new SISMWAW<>(builder, cacheLoader, async);
      case "SISMWAWR": return new SISMWAWR<>(builder, cacheLoader, async);
      case "SISMWR": return new SISMWR<>(builder, cacheLoader, async);
      case "SISMWW": return new SISMWW<>(builder, cacheLoader, async);
      case "SISMWWR": return new SISMWWR<>(builder, cacheLoader, async);
      case "SISR": return new SISR<>(builder, cacheLoader, async);
      case "SISW": return new SISW<>(builder, cacheLoader, async);
      case "SISWR": return new SISWR<>(builder, cacheLoader, async);
      case "SIW": return new SIW<>(builder, cacheLoader, async);
      case "SIWR": return new SIWR<>(builder, cacheLoader, async);
      case "SS": return new SS<>(builder, cacheLoader, async);
      case "SSA": return new SSA<>(builder, cacheLoader, async);
      case "SSAR": return new SSAR<>(builder, cacheLoader, async);
      case "SSAW": return new SSAW<>(builder, cacheLoader, async);
      case "SSAWR": return new SSAWR<>(builder, cacheLoader, async);
      case "SSLi": return new SSLi<>(builder, cacheLoader, async);
      case "SSLiA": return new SSLiA<>(builder, cacheLoader, async);
      case "SSLiAR": return new SSLiAR<>(builder, cacheLoader, async);
      case "SSLiAW": return new SSLiAW<>(builder, cacheLoader, async);
      case "SSLiAWR": return new SSLiAWR<>(builder, cacheLoader, async);
      case "SSLiMS": return new SSLiMS<>(builder, cacheLoader, async);
      case "SSLiMSA": return new SSLiMSA<>(builder, cacheLoader, async);
      case "SSLiMSAR": return new SSLiMSAR<>(builder, cacheLoader, async);
      case "SSLiMSAW": return new SSLiMSAW<>(builder, cacheLoader, async);
      case "SSLiMSAWR": return new SSLiMSAWR<>(builder, cacheLoader, async);
      case "SSLiMSR": return new SSLiMSR<>(builder, cacheLoader, async);
      case "SSLiMSW": return new SSLiMSW<>(builder, cacheLoader, async);
      case "SSLiMSWR": return new SSLiMSWR<>(builder, cacheLoader, async);
      case "SSLiMW": return new SSLiMW<>(builder, cacheLoader, async);
      case "SSLiMWA": return new SSLiMWA<>(builder, cacheLoader, async);
      case "SSLiMWAR": return new SSLiMWAR<>(builder, cacheLoader, async);
      case "SSLiMWAW": return new SSLiMWAW<>(builder, cacheLoader, async);
      case "SSLiMWAWR": return new SSLiMWAWR<>(builder, cacheLoader, async);
      case "SSLiMWR": return new SSLiMWR<>(builder, cacheLoader, async);
      case "SSLiMWW": return new SSLiMWW<>(builder, cacheLoader, async);
      case "SSLiMWWR": return new SSLiMWWR<>(builder, cacheLoader, async);
      case "SSLiR": return new SSLiR<>(builder, cacheLoader, async);
      case "SSLiS": return new SSLiS<>(builder, cacheLoader, async);
      case "SSLiSA": return new SSLiSA<>(builder, cacheLoader, async);
      case "SSLiSAR": return new SSLiSAR<>(builder, cacheLoader, async);
      case "SSLiSAW": return new SSLiSAW<>(builder, cacheLoader, async);
      case "SSLiSAWR": return new SSLiSAWR<>(builder, cacheLoader, async);
      case "SSLiSMS": return new SSLiSMS<>(builder, cacheLoader, async);
      case "SSLiSMSA": return new SSLiSMSA<>(builder, cacheLoader, async);
      case "SSLiSMSAR": return new SSLiSMSAR<>(builder, cacheLoader, async);
      case "SSLiSMSAW": return new SSLiSMSAW<>(builder, cacheLoader, async);
      case "SSLiSMSAWR": return new SSLiSMSAWR<>(builder, cacheLoader, async);
      case "SSLiSMSR": return new SSLiSMSR<>(builder, cacheLoader, async);
      case "SSLiSMSW": return new SSLiSMSW<>(builder, cacheLoader, async);
      case "SSLiSMSWR": return new SSLiSMSWR<>(builder, cacheLoader, async);
      case "SSLiSMW": return new SSLiSMW<>(builder, cacheLoader, async);
      case "SSLiSMWA": return new SSLiSMWA<>(builder, cacheLoader, async);
      case "SSLiSMWAR": return new SSLiSMWAR<>(builder, cacheLoader, async);
      case "SSLiSMWAW": return new SSLiSMWAW<>(builder, cacheLoader, async);
      case "SSLiSMWAWR": return new SSLiSMWAWR<>(builder, cacheLoader, async);
      case "SSLiSMWR": return new SSLiSMWR<>(builder, cacheLoader, async);
      case "SSLiSMWW": return new SSLiSMWW<>(builder, cacheLoader, async);
      case "SSLiSMWWR": return new SSLiSMWWR<>(builder, cacheLoader, async);
      case "SSLiSR": return new SSLiSR<>(builder, cacheLoader, async);
      case "SSLiSW": return new SSLiSW<>(builder, cacheLoader, async);
      case "SSLiSWR": return new SSLiSWR<>(builder, cacheLoader, async);
      case "SSLiW": return new SSLiW<>(builder, cacheLoader, async);
      case "SSLiWR": return new SSLiWR<>(builder, cacheLoader, async);
      case "SSMS": return new SSMS<>(builder, cacheLoader, async);
      case "SSMSA": return new SSMSA<>(builder, cacheLoader, async);
      case "SSMSAR": return new SSMSAR<>(builder, cacheLoader, async);
      case "SSMSAW": return new SSMSAW<>(builder, cacheLoader, async);
      case "SSMSAWR": return new SSMSAWR<>(builder, cacheLoader, async);
      case "SSMSR": return new SSMSR<>(builder, cacheLoader, async);
      case "SSMSW": return new SSMSW<>(builder, cacheLoader, async);
      case "SSMSWR": return new SSMSWR<>(builder, cacheLoader, async);
      case "SSMW": return new SSMW<>(builder, cacheLoader, async);
      case "SSMWA": return new SSMWA<>(builder, cacheLoader, async);
      case "SSMWAR": return new SSMWAR<>(builder, cacheLoader, async);
      case "SSMWAW": return new SSMWAW<>(builder, cacheLoader, async);
      case "SSMWAWR": return new SSMWAWR<>(builder, cacheLoader, async);
      case "SSMWR": return new SSMWR<>(builder, cacheLoader, async);
      case "SSMWW": return new SSMWW<>(builder, cacheLoader, async);
      case "SSMWWR": return new SSMWWR<>(builder, cacheLoader, async);
      case "SSR": return new SSR<>(builder, cacheLoader, async);
      case "SSS": return new SSS<>(builder, cacheLoader, async);
      case "SSSA": return new SSSA<>(builder, cacheLoader, async);
      case "SSSAR": return new SSSAR<>(builder, cacheLoader, async);
      case "SSSAW": return new SSSAW<>(builder, cacheLoader, async);
      case "SSSAWR": return new SSSAWR<>(builder, cacheLoader, async);
      case "SSSMS": return new SSSMS<>(builder, cacheLoader, async);
      case "SSSMSA": return new SSSMSA<>(builder, cacheLoader, async);
      case "SSSMSAR": return new SSSMSAR<>(builder, cacheLoader, async);
      case "SSSMSAW": return new SSSMSAW<>(builder, cacheLoader, async);
      case "SSSMSAWR": return new SSSMSAWR<>(builder, cacheLoader, async);
      case "SSSMSR": return new SSSMSR<>(builder, cacheLoader, async);
      case "SSSMSW": return new SSSMSW<>(builder, cacheLoader, async);
      case "SSSMSWR": return new SSSMSWR<>(builder, cacheLoader, async);
      case "SSSMW": return new SSSMW<>(builder, cacheLoader, async);
      case "SSSMWA": return new SSSMWA<>(builder, cacheLoader, async);
      case "SSSMWAR": return new SSSMWAR<>(builder, cacheLoader, async);
      case "SSSMWAW": return new SSSMWAW<>(builder, cacheLoader, async);
      case "SSSMWAWR": return new SSSMWAWR<>(builder, cacheLoader, async);
      case "SSSMWR": return new SSSMWR<>(builder, cacheLoader, async);
      case "SSSMWW": return new SSSMWW<>(builder, cacheLoader, async);
      case "SSSMWWR": return new SSSMWWR<>(builder, cacheLoader, async);
      case "SSSR": return new SSSR<>(builder, cacheLoader, async);
      case "SSSW": return new SSSW<>(builder, cacheLoader, async);
      case "SSSWR": return new SSSWR<>(builder, cacheLoader, async);
      case "SSW": return new SSW<>(builder, cacheLoader, async);
      case "SSWR": return new SSWR<>(builder, cacheLoader, async);
      case "WI": return new WI<>(builder, cacheLoader, async);
      case "WIA": return new WIA<>(builder, cacheLoader, async);
      case "WIAR": return new WIAR<>(builder, cacheLoader, async);
      case "WIAW": return new WIAW<>(builder, cacheLoader, async);
      case "WIAWR": return new WIAWR<>(builder, cacheLoader, async);
      case "WILi": return new WILi<>(builder, cacheLoader, async);
      case "WILiA": return new WILiA<>(builder, cacheLoader, async);
      case "WILiAR": return new WILiAR<>(builder, cacheLoader, async);
      case "WILiAW": return new WILiAW<>(builder, cacheLoader, async);
      case "WILiAWR": return new WILiAWR<>(builder, cacheLoader, async);
      case "WILiMS": return new WILiMS<>(builder, cacheLoader, async);
      case "WILiMSA": return new WILiMSA<>(builder, cacheLoader, async);
      case "WILiMSAR": return new WILiMSAR<>(builder, cacheLoader, async);
      case "WILiMSAW": return new WILiMSAW<>(builder, cacheLoader, async);
      case "WILiMSAWR": return new WILiMSAWR<>(builder, cacheLoader, async);
      case "WILiMSR": return new WILiMSR<>(builder, cacheLoader, async);
      case "WILiMSW": return new WILiMSW<>(builder, cacheLoader, async);
      case "WILiMSWR": return new WILiMSWR<>(builder, cacheLoader, async);
      case "WILiMW": return new WILiMW<>(builder, cacheLoader, async);
      case "WILiMWA": return new WILiMWA<>(builder, cacheLoader, async);
      case "WILiMWAR": return new WILiMWAR<>(builder, cacheLoader, async);
      case "WILiMWAW": return new WILiMWAW<>(builder, cacheLoader, async);
      case "WILiMWAWR": return new WILiMWAWR<>(builder, cacheLoader, async);
      case "WILiMWR": return new WILiMWR<>(builder, cacheLoader, async);
      case "WILiMWW": return new WILiMWW<>(builder, cacheLoader, async);
      case "WILiMWWR": return new WILiMWWR<>(builder, cacheLoader, async);
      case "WILiR": return new WILiR<>(builder, cacheLoader, async);
      case "WILiS": return new WILiS<>(builder, cacheLoader, async);
      case "WILiSA": return new WILiSA<>(builder, cacheLoader, async);
      case "WILiSAR": return new WILiSAR<>(builder, cacheLoader, async);
      case "WILiSAW": return new WILiSAW<>(builder, cacheLoader, async);
      case "WILiSAWR": return new WILiSAWR<>(builder, cacheLoader, async);
      case "WILiSMS": return new WILiSMS<>(builder, cacheLoader, async);
      case "WILiSMSA": return new WILiSMSA<>(builder, cacheLoader, async);
      case "WILiSMSAR": return new WILiSMSAR<>(builder, cacheLoader, async);
      case "WILiSMSAW": return new WILiSMSAW<>(builder, cacheLoader, async);
      case "WILiSMSAWR": return new WILiSMSAWR<>(builder, cacheLoader, async);
      case "WILiSMSR": return new WILiSMSR<>(builder, cacheLoader, async);
      case "WILiSMSW": return new WILiSMSW<>(builder, cacheLoader, async);
      case "WILiSMSWR": return new WILiSMSWR<>(builder, cacheLoader, async);
      case "WILiSMW": return new WILiSMW<>(builder, cacheLoader, async);
      case "WILiSMWA": return new WILiSMWA<>(builder, cacheLoader, async);
      case "WILiSMWAR": return new WILiSMWAR<>(builder, cacheLoader, async);
      case "WILiSMWAW": return new WILiSMWAW<>(builder, cacheLoader, async);
      case "WILiSMWAWR": return new WILiSMWAWR<>(builder, cacheLoader, async);
      case "WILiSMWR": return new WILiSMWR<>(builder, cacheLoader, async);
      case "WILiSMWW": return new WILiSMWW<>(builder, cacheLoader, async);
      case "WILiSMWWR": return new WILiSMWWR<>(builder, cacheLoader, async);
      case "WILiSR": return new WILiSR<>(builder, cacheLoader, async);
      case "WILiSW": return new WILiSW<>(builder, cacheLoader, async);
      case "WILiSWR": return new WILiSWR<>(builder, cacheLoader, async);
      case "WILiW": return new WILiW<>(builder, cacheLoader, async);
      case "WILiWR": return new WILiWR<>(builder, cacheLoader, async);
      case "WIMS": return new WIMS<>(builder, cacheLoader, async);
      case "WIMSA": return new WIMSA<>(builder, cacheLoader, async);
      case "WIMSAR": return new WIMSAR<>(builder, cacheLoader, async);
      case "WIMSAW": return new WIMSAW<>(builder, cacheLoader, async);
      case "WIMSAWR": return new WIMSAWR<>(builder, cacheLoader, async);
      case "WIMSR": return new WIMSR<>(builder, cacheLoader, async);
      case "WIMSW": return new WIMSW<>(builder, cacheLoader, async);
      case "WIMSWR": return new WIMSWR<>(builder, cacheLoader, async);
      case "WIMW": return new WIMW<>(builder, cacheLoader, async);
      case "WIMWA": return new WIMWA<>(builder, cacheLoader, async);
      case "WIMWAR": return new WIMWAR<>(builder, cacheLoader, async);
      case "WIMWAW": return new WIMWAW<>(builder, cacheLoader, async);
      case "WIMWAWR": return new WIMWAWR<>(builder, cacheLoader, async);
      case "WIMWR": return new WIMWR<>(builder, cacheLoader, async);
      case "WIMWW": return new WIMWW<>(builder, cacheLoader, async);
      case "WIMWWR": return new WIMWWR<>(builder, cacheLoader, async);
      case "WIR": return new WIR<>(builder, cacheLoader, async);
      case "WIS": return new WIS<>(builder, cacheLoader, async);
      case "WISA": return new WISA<>(builder, cacheLoader, async);
      case "WISAR": return new WISAR<>(builder, cacheLoader, async);
      case "WISAW": return new WISAW<>(builder, cacheLoader, async);
      case "WISAWR": return new WISAWR<>(builder, cacheLoader, async);
      case "WISMS": return new WISMS<>(builder, cacheLoader, async);
      case "WISMSA": return new WISMSA<>(builder, cacheLoader, async);
      case "WISMSAR": return new WISMSAR<>(builder, cacheLoader, async);
      case "WISMSAW": return new WISMSAW<>(builder, cacheLoader, async);
      case "WISMSAWR": return new WISMSAWR<>(builder, cacheLoader, async);
      case "WISMSR": return new WISMSR<>(builder, cacheLoader, async);
      case "WISMSW": return new WISMSW<>(builder, cacheLoader, async);
      case "WISMSWR": return new WISMSWR<>(builder, cacheLoader, async);
      case "WISMW": return new WISMW<>(builder, cacheLoader, async);
      case "WISMWA": return new WISMWA<>(builder, cacheLoader, async);
      case "WISMWAR": return new WISMWAR<>(builder, cacheLoader, async);
      case "WISMWAW": return new WISMWAW<>(builder, cacheLoader, async);
      case "WISMWAWR": return new WISMWAWR<>(builder, cacheLoader, async);
      case "WISMWR": return new WISMWR<>(builder, cacheLoader, async);
      case "WISMWW": return new WISMWW<>(builder, cacheLoader, async);
      case "WISMWWR": return new WISMWWR<>(builder, cacheLoader, async);
      case "WISR": return new WISR<>(builder, cacheLoader, async);
      case "WISW": return new WISW<>(builder, cacheLoader, async);
      case "WISWR": return new WISWR<>(builder, cacheLoader, async);
      case "WIW": return new WIW<>(builder, cacheLoader, async);
      case "WIWR": return new WIWR<>(builder, cacheLoader, async);
      case "WS": return new WS<>(builder, cacheLoader, async);
      case "WSA": return new WSA<>(builder, cacheLoader, async);
      case "WSAR": return new WSAR<>(builder, cacheLoader, async);
      case "WSAW": return new WSAW<>(builder, cacheLoader, async);
      case "WSAWR": return new WSAWR<>(builder, cacheLoader, async);
      case "WSLi": return new WSLi<>(builder, cacheLoader, async);
      case "WSLiA": return new WSLiA<>(builder, cacheLoader, async);
      case "WSLiAR": return new WSLiAR<>(builder, cacheLoader, async);
      case "WSLiAW": return new WSLiAW<>(builder, cacheLoader, async);
      case "WSLiAWR": return new WSLiAWR<>(builder, cacheLoader, async);
      case "WSLiMS": return new WSLiMS<>(builder, cacheLoader, async);
      case "WSLiMSA": return new WSLiMSA<>(builder, cacheLoader, async);
      case "WSLiMSAR": return new WSLiMSAR<>(builder, cacheLoader, async);
      case "WSLiMSAW": return new WSLiMSAW<>(builder, cacheLoader, async);
      case "WSLiMSAWR": return new WSLiMSAWR<>(builder, cacheLoader, async);
      case "WSLiMSR": return new WSLiMSR<>(builder, cacheLoader, async);
      case "WSLiMSW": return new WSLiMSW<>(builder, cacheLoader, async);
      case "WSLiMSWR": return new WSLiMSWR<>(builder, cacheLoader, async);
      case "WSLiMW": return new WSLiMW<>(builder, cacheLoader, async);
      case "WSLiMWA": return new WSLiMWA<>(builder, cacheLoader, async);
      case "WSLiMWAR": return new WSLiMWAR<>(builder, cacheLoader, async);
      case "WSLiMWAW": return new WSLiMWAW<>(builder, cacheLoader, async);
      case "WSLiMWAWR": return new WSLiMWAWR<>(builder, cacheLoader, async);
      case "WSLiMWR": return new WSLiMWR<>(builder, cacheLoader, async);
      case "WSLiMWW": return new WSLiMWW<>(builder, cacheLoader, async);
      case "WSLiMWWR": return new WSLiMWWR<>(builder, cacheLoader, async);
      case "WSLiR": return new WSLiR<>(builder, cacheLoader, async);
      case "WSLiS": return new WSLiS<>(builder, cacheLoader, async);
      case "WSLiSA": return new WSLiSA<>(builder, cacheLoader, async);
      case "WSLiSAR": return new WSLiSAR<>(builder, cacheLoader, async);
      case "WSLiSAW": return new WSLiSAW<>(builder, cacheLoader, async);
      case "WSLiSAWR": return new WSLiSAWR<>(builder, cacheLoader, async);
      case "WSLiSMS": return new WSLiSMS<>(builder, cacheLoader, async);
      case "WSLiSMSA": return new WSLiSMSA<>(builder, cacheLoader, async);
      case "WSLiSMSAR": return new WSLiSMSAR<>(builder, cacheLoader, async);
      case "WSLiSMSAW": return new WSLiSMSAW<>(builder, cacheLoader, async);
      case "WSLiSMSAWR": return new WSLiSMSAWR<>(builder, cacheLoader, async);
      case "WSLiSMSR": return new WSLiSMSR<>(builder, cacheLoader, async);
      case "WSLiSMSW": return new WSLiSMSW<>(builder, cacheLoader, async);
      case "WSLiSMSWR": return new WSLiSMSWR<>(builder, cacheLoader, async);
      case "WSLiSMW": return new WSLiSMW<>(builder, cacheLoader, async);
      case "WSLiSMWA": return new WSLiSMWA<>(builder, cacheLoader, async);
      case "WSLiSMWAR": return new WSLiSMWAR<>(builder, cacheLoader, async);
      case "WSLiSMWAW": return new WSLiSMWAW<>(builder, cacheLoader, async);
      case "WSLiSMWAWR": return new WSLiSMWAWR<>(builder, cacheLoader, async);
      case "WSLiSMWR": return new WSLiSMWR<>(builder, cacheLoader, async);
      case "WSLiSMWW": return new WSLiSMWW<>(builder, cacheLoader, async);
      case "WSLiSMWWR": return new WSLiSMWWR<>(builder, cacheLoader, async);
      case "WSLiSR": return new WSLiSR<>(builder, cacheLoader, async);
      case "WSLiSW": return new WSLiSW<>(builder, cacheLoader, async);
      case "WSLiSWR": return new WSLiSWR<>(builder, cacheLoader, async);
      case "WSLiW": return new WSLiW<>(builder, cacheLoader, async);
      case "WSLiWR": return new WSLiWR<>(builder, cacheLoader, async);
      case "WSMS": return new WSMS<>(builder, cacheLoader, async);
      case "WSMSA": return new WSMSA<>(builder, cacheLoader, async);
      case "WSMSAR": return new WSMSAR<>(builder, cacheLoader, async);
      case "WSMSAW": return new WSMSAW<>(builder, cacheLoader, async);
      case "WSMSAWR": return new WSMSAWR<>(builder, cacheLoader, async);
      case "WSMSR": return new WSMSR<>(builder, cacheLoader, async);
      case "WSMSW": return new WSMSW<>(builder, cacheLoader, async);
      case "WSMSWR": return new WSMSWR<>(builder, cacheLoader, async);
      case "WSMW": return new WSMW<>(builder, cacheLoader, async);
      case "WSMWA": return new WSMWA<>(builder, cacheLoader, async);
      case "WSMWAR": return new WSMWAR<>(builder, cacheLoader, async);
      case "WSMWAW": return new WSMWAW<>(builder, cacheLoader, async);
      case "WSMWAWR": return new WSMWAWR<>(builder, cacheLoader, async);
      case "WSMWR": return new WSMWR<>(builder, cacheLoader, async);
      case "WSMWW": return new WSMWW<>(builder, cacheLoader, async);
      case "WSMWWR": return new WSMWWR<>(builder, cacheLoader, async);
      case "WSR": return new WSR<>(builder, cacheLoader, async);
      case "WSS": return new WSS<>(builder, cacheLoader, async);
      case "WSSA": return new WSSA<>(builder, cacheLoader, async);
      case "WSSAR": return new WSSAR<>(builder, cacheLoader, async);
      case "WSSAW": return new WSSAW<>(builder, cacheLoader, async);
      case "WSSAWR": return new WSSAWR<>(builder, cacheLoader, async);
      case "WSSMS": return new WSSMS<>(builder, cacheLoader, async);
      case "WSSMSA": return new WSSMSA<>(builder, cacheLoader, async);
      case "WSSMSAR": return new WSSMSAR<>(builder, cacheLoader, async);
      case "WSSMSAW": return new WSSMSAW<>(builder, cacheLoader, async);
      case "WSSMSAWR": return new WSSMSAWR<>(builder, cacheLoader, async);
      case "WSSMSR": return new WSSMSR<>(builder, cacheLoader, async);
      case "WSSMSW": return new WSSMSW<>(builder, cacheLoader, async);
      case "WSSMSWR": return new WSSMSWR<>(builder, cacheLoader, async);
      case "WSSMW": return new WSSMW<>(builder, cacheLoader, async);
      case "WSSMWA": return new WSSMWA<>(builder, cacheLoader, async);
      case "WSSMWAR": return new WSSMWAR<>(builder, cacheLoader, async);
      case "WSSMWAW": return new WSSMWAW<>(builder, cacheLoader, async);
      case "WSSMWAWR": return new WSSMWAWR<>(builder, cacheLoader, async);
      case "WSSMWR": return new WSSMWR<>(builder, cacheLoader, async);
      case "WSSMWW": return new WSSMWW<>(builder, cacheLoader, async);
      case "WSSMWWR": return new WSSMWWR<>(builder, cacheLoader, async);
      case "WSSR": return new WSSR<>(builder, cacheLoader, async);
      case "WSSW": return new WSSW<>(builder, cacheLoader, async);
      case "WSSWR": return new WSSWR<>(builder, cacheLoader, async);
      case "WSW": return new WSW<>(builder, cacheLoader, async);
      case "WSWR": return new WSWR<>(builder, cacheLoader, async);
      default: throw new IllegalStateException(sb.toString());
    }
  }

  static class SI extends BoundedLocalCache {
    private final ReferenceQueue valueReferenceQueue = new ReferenceQueue();

    SI(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
    }

    protected final ReferenceQueue valueReferenceQueue() {
      return valueReferenceQueue;
    }

    protected final boolean collectValues() {
      return true;
    }
  }

  static class SIA extends SI {
    private final Ticker ticker;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private volatile long expiresAfterAccessNanos;

    private final WriteBuffer writeBuffer;

    SIA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class SIAR extends SIA {
    private volatile long refreshAfterWriteNanos;

    SIAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SIAW extends SIA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SIAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SIAWR extends SIAW {
    private volatile long refreshAfterWriteNanos;

    SIAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SILi extends SI {
    private final RemovalListener removalListener;

    SILi(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.removalListener = builder.getRemovalListener(async);
    }

    public final RemovalListener removalListener() {
      return removalListener;
    }

    public final boolean hasRemovalListener() {
      return true;
    }
  }

  static class SILiA extends SILi {
    private final Ticker ticker;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private volatile long expiresAfterAccessNanos;

    private final WriteBuffer writeBuffer;

    SILiA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class SILiAR extends SILiA {
    private volatile long refreshAfterWriteNanos;

    SILiAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SILiAW extends SILiA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SILiAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SILiAWR extends SILiAW {
    private volatile long refreshAfterWriteNanos;

    SILiAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SILiMS extends SILi {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SILiMS.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SILiMS.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SILiMS.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SILiMS.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SILiMS.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SILiMS.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    SILiMS(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class SILiMSA extends SILiMS {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    SILiMSA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class SILiMSAR extends SILiMSA {
    private volatile long refreshAfterWriteNanos;

    SILiMSAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SILiMSAW extends SILiMSA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SILiMSAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SILiMSAWR extends SILiMSAW {
    private volatile long refreshAfterWriteNanos;

    SILiMSAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class SILiMSR extends SILiMS {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    SILiMSR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SILiMSW extends SILiMS {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SILiMSW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SILiMSWR extends SILiMSW {
    private volatile long refreshAfterWriteNanos;

    SILiMSWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SILiMW extends SILi {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SILiMW.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SILiMW.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SILiMW.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SILiMW.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SILiMW.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SILiMW.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    SILiMW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class SILiMWA extends SILiMW {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    SILiMWA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class SILiMWAR extends SILiMWA {
    private volatile long refreshAfterWriteNanos;

    SILiMWAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SILiMWAW extends SILiMWA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SILiMWAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SILiMWAWR extends SILiMWAW {
    private volatile long refreshAfterWriteNanos;

    SILiMWAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class SILiMWR extends SILiMW {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    SILiMWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SILiMWW extends SILiMW {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SILiMWW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SILiMWWR extends SILiMWW {
    private volatile long refreshAfterWriteNanos;

    SILiMWWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class SILiR extends SILi {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    SILiR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class SILiS extends SILi {
    private final StatsCounter statsCounter;

    SILiS(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.statsCounter = builder.getStatsCounterSupplier().get();
    }

    public final boolean isRecordingStats() {
      return true;
    }

    public final Ticker statsTicker() {
      return Ticker.systemTicker();
    }

    public final StatsCounter statsCounter() {
      return statsCounter;
    }
  }

  static class SILiSA extends SILiS {
    private final Ticker ticker;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private volatile long expiresAfterAccessNanos;

    private final WriteBuffer writeBuffer;

    SILiSA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class SILiSAR extends SILiSA {
    private volatile long refreshAfterWriteNanos;

    SILiSAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SILiSAW extends SILiSA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SILiSAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SILiSAWR extends SILiSAW {
    private volatile long refreshAfterWriteNanos;

    SILiSAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SILiSMS extends SILiS {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SILiSMS.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SILiSMS.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SILiSMS.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SILiSMS.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SILiSMS.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SILiSMS.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    SILiSMS(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class SILiSMSA extends SILiSMS {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    SILiSMSA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class SILiSMSAR extends SILiSMSA {
    private volatile long refreshAfterWriteNanos;

    SILiSMSAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SILiSMSAW extends SILiSMSA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SILiSMSAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SILiSMSAWR extends SILiSMSAW {
    private volatile long refreshAfterWriteNanos;

    SILiSMSAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class SILiSMSR extends SILiSMS {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    SILiSMSR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SILiSMSW extends SILiSMS {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SILiSMSW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SILiSMSWR extends SILiSMSW {
    private volatile long refreshAfterWriteNanos;

    SILiSMSWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SILiSMW extends SILiS {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SILiSMW.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SILiSMW.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SILiSMW.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SILiSMW.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SILiSMW.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SILiSMW.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    SILiSMW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class SILiSMWA extends SILiSMW {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    SILiSMWA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class SILiSMWAR extends SILiSMWA {
    private volatile long refreshAfterWriteNanos;

    SILiSMWAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SILiSMWAW extends SILiSMWA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SILiSMWAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SILiSMWAWR extends SILiSMWAW {
    private volatile long refreshAfterWriteNanos;

    SILiSMWAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class SILiSMWR extends SILiSMW {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    SILiSMWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SILiSMWW extends SILiSMW {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SILiSMWW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SILiSMWWR extends SILiSMWW {
    private volatile long refreshAfterWriteNanos;

    SILiSMWWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class SILiSR extends SILiS {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    SILiSR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class SILiSW extends SILiS {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    SILiSW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class SILiSWR extends SILiSW {
    private volatile long refreshAfterWriteNanos;

    SILiSWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SILiW extends SILi {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    SILiW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class SILiWR extends SILiW {
    private volatile long refreshAfterWriteNanos;

    SILiWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SIMS extends SI {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SIMS.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SIMS.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SIMS.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SIMS.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SIMS.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SIMS.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    SIMS(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class SIMSA extends SIMS {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    SIMSA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class SIMSAR extends SIMSA {
    private volatile long refreshAfterWriteNanos;

    SIMSAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SIMSAW extends SIMSA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SIMSAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SIMSAWR extends SIMSAW {
    private volatile long refreshAfterWriteNanos;

    SIMSAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class SIMSR extends SIMS {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    SIMSR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SIMSW extends SIMS {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SIMSW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SIMSWR extends SIMSW {
    private volatile long refreshAfterWriteNanos;

    SIMSWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SIMW extends SI {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SIMW.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SIMW.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SIMW.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SIMW.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SIMW.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SIMW.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    SIMW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class SIMWA extends SIMW {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    SIMWA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class SIMWAR extends SIMWA {
    private volatile long refreshAfterWriteNanos;

    SIMWAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SIMWAW extends SIMWA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SIMWAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SIMWAWR extends SIMWAW {
    private volatile long refreshAfterWriteNanos;

    SIMWAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class SIMWR extends SIMW {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    SIMWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SIMWW extends SIMW {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SIMWW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SIMWWR extends SIMWW {
    private volatile long refreshAfterWriteNanos;

    SIMWWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class SIR extends SI {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    SIR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class SIS extends SI {
    private final StatsCounter statsCounter;

    SIS(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.statsCounter = builder.getStatsCounterSupplier().get();
    }

    public final boolean isRecordingStats() {
      return true;
    }

    public final Ticker statsTicker() {
      return Ticker.systemTicker();
    }

    public final StatsCounter statsCounter() {
      return statsCounter;
    }
  }

  static class SISA extends SIS {
    private final Ticker ticker;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private volatile long expiresAfterAccessNanos;

    private final WriteBuffer writeBuffer;

    SISA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class SISAR extends SISA {
    private volatile long refreshAfterWriteNanos;

    SISAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SISAW extends SISA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SISAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SISAWR extends SISAW {
    private volatile long refreshAfterWriteNanos;

    SISAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SISMS extends SIS {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SISMS.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SISMS.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SISMS.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SISMS.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SISMS.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SISMS.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    SISMS(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class SISMSA extends SISMS {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    SISMSA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class SISMSAR extends SISMSA {
    private volatile long refreshAfterWriteNanos;

    SISMSAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SISMSAW extends SISMSA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SISMSAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SISMSAWR extends SISMSAW {
    private volatile long refreshAfterWriteNanos;

    SISMSAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class SISMSR extends SISMS {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    SISMSR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SISMSW extends SISMS {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SISMSW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SISMSWR extends SISMSW {
    private volatile long refreshAfterWriteNanos;

    SISMSWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SISMW extends SIS {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SISMW.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SISMW.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SISMW.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SISMW.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SISMW.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SISMW.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    SISMW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class SISMWA extends SISMW {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    SISMWA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class SISMWAR extends SISMWA {
    private volatile long refreshAfterWriteNanos;

    SISMWAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SISMWAW extends SISMWA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SISMWAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SISMWAWR extends SISMWAW {
    private volatile long refreshAfterWriteNanos;

    SISMWAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class SISMWR extends SISMW {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    SISMWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SISMWW extends SISMW {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SISMWW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SISMWWR extends SISMWW {
    private volatile long refreshAfterWriteNanos;

    SISMWWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class SISR extends SIS {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    SISR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class SISW extends SIS {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    SISW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class SISWR extends SISW {
    private volatile long refreshAfterWriteNanos;

    SISWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SIW extends SI {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    SIW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class SIWR extends SIW {
    private volatile long refreshAfterWriteNanos;

    SIWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SS extends BoundedLocalCache {
    SS(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
    }
  }

  static class SSA extends SS {
    private final Ticker ticker;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private volatile long expiresAfterAccessNanos;

    private final WriteBuffer writeBuffer;

    SSA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class SSAR extends SSA {
    private volatile long refreshAfterWriteNanos;

    SSAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSAW extends SSA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SSAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SSAWR extends SSAW {
    private volatile long refreshAfterWriteNanos;

    SSAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSLi extends SS {
    private final RemovalListener removalListener;

    SSLi(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.removalListener = builder.getRemovalListener(async);
    }

    public final RemovalListener removalListener() {
      return removalListener;
    }

    public final boolean hasRemovalListener() {
      return true;
    }
  }

  static class SSLiA extends SSLi {
    private final Ticker ticker;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private volatile long expiresAfterAccessNanos;

    private final WriteBuffer writeBuffer;

    SSLiA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class SSLiAR extends SSLiA {
    private volatile long refreshAfterWriteNanos;

    SSLiAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSLiAW extends SSLiA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SSLiAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SSLiAWR extends SSLiAW {
    private volatile long refreshAfterWriteNanos;

    SSLiAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSLiMS extends SSLi {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SSLiMS.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SSLiMS.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SSLiMS.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SSLiMS.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SSLiMS.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SSLiMS.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    SSLiMS(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected boolean fastpath() {
      return true;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class SSLiMSA extends SSLiMS {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    SSLiMSA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected boolean fastpath() {
      return false;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class SSLiMSAR extends SSLiMSA {
    private volatile long refreshAfterWriteNanos;

    SSLiMSAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSLiMSAW extends SSLiMSA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SSLiMSAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SSLiMSAWR extends SSLiMSAW {
    private volatile long refreshAfterWriteNanos;

    SSLiMSAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class SSLiMSR extends SSLiMS {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    SSLiMSR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSLiMSW extends SSLiMS {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SSLiMSW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SSLiMSWR extends SSLiMSW {
    private volatile long refreshAfterWriteNanos;

    SSLiMSWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSLiMW extends SSLi {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SSLiMW.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SSLiMW.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SSLiMW.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SSLiMW.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SSLiMW.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SSLiMW.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    SSLiMW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected boolean fastpath() {
      return true;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class SSLiMWA extends SSLiMW {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    SSLiMWA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected boolean fastpath() {
      return false;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class SSLiMWAR extends SSLiMWA {
    private volatile long refreshAfterWriteNanos;

    SSLiMWAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSLiMWAW extends SSLiMWA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SSLiMWAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SSLiMWAWR extends SSLiMWAW {
    private volatile long refreshAfterWriteNanos;

    SSLiMWAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class SSLiMWR extends SSLiMW {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    SSLiMWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSLiMWW extends SSLiMW {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SSLiMWW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SSLiMWWR extends SSLiMWW {
    private volatile long refreshAfterWriteNanos;

    SSLiMWWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class SSLiR extends SSLi {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    SSLiR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class SSLiS extends SSLi {
    private final StatsCounter statsCounter;

    SSLiS(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.statsCounter = builder.getStatsCounterSupplier().get();
    }

    public final boolean isRecordingStats() {
      return true;
    }

    public final Ticker statsTicker() {
      return Ticker.systemTicker();
    }

    public final StatsCounter statsCounter() {
      return statsCounter;
    }
  }

  static class SSLiSA extends SSLiS {
    private final Ticker ticker;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private volatile long expiresAfterAccessNanos;

    private final WriteBuffer writeBuffer;

    SSLiSA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class SSLiSAR extends SSLiSA {
    private volatile long refreshAfterWriteNanos;

    SSLiSAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSLiSAW extends SSLiSA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SSLiSAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SSLiSAWR extends SSLiSAW {
    private volatile long refreshAfterWriteNanos;

    SSLiSAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSLiSMS extends SSLiS {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SSLiSMS.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SSLiSMS.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SSLiSMS.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SSLiSMS.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SSLiSMS.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SSLiSMS.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    SSLiSMS(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected boolean fastpath() {
      return true;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class SSLiSMSA extends SSLiSMS {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    SSLiSMSA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected boolean fastpath() {
      return false;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class SSLiSMSAR extends SSLiSMSA {
    private volatile long refreshAfterWriteNanos;

    SSLiSMSAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSLiSMSAW extends SSLiSMSA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SSLiSMSAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SSLiSMSAWR extends SSLiSMSAW {
    private volatile long refreshAfterWriteNanos;

    SSLiSMSAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class SSLiSMSR extends SSLiSMS {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    SSLiSMSR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSLiSMSW extends SSLiSMS {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SSLiSMSW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SSLiSMSWR extends SSLiSMSW {
    private volatile long refreshAfterWriteNanos;

    SSLiSMSWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSLiSMW extends SSLiS {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SSLiSMW.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SSLiSMW.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SSLiSMW.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SSLiSMW.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SSLiSMW.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SSLiSMW.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    SSLiSMW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected boolean fastpath() {
      return true;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class SSLiSMWA extends SSLiSMW {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    SSLiSMWA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected boolean fastpath() {
      return false;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class SSLiSMWAR extends SSLiSMWA {
    private volatile long refreshAfterWriteNanos;

    SSLiSMWAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSLiSMWAW extends SSLiSMWA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SSLiSMWAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SSLiSMWAWR extends SSLiSMWAW {
    private volatile long refreshAfterWriteNanos;

    SSLiSMWAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class SSLiSMWR extends SSLiSMW {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    SSLiSMWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSLiSMWW extends SSLiSMW {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SSLiSMWW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SSLiSMWWR extends SSLiSMWW {
    private volatile long refreshAfterWriteNanos;

    SSLiSMWWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class SSLiSR extends SSLiS {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    SSLiSR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class SSLiSW extends SSLiS {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    SSLiSW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class SSLiSWR extends SSLiSW {
    private volatile long refreshAfterWriteNanos;

    SSLiSWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSLiW extends SSLi {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    SSLiW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class SSLiWR extends SSLiW {
    private volatile long refreshAfterWriteNanos;

    SSLiWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSMS extends SS {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SSMS.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SSMS.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SSMS.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SSMS.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SSMS.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SSMS.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    SSMS(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected boolean fastpath() {
      return true;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class SSMSA extends SSMS {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    SSMSA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected boolean fastpath() {
      return false;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class SSMSAR extends SSMSA {
    private volatile long refreshAfterWriteNanos;

    SSMSAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSMSAW extends SSMSA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SSMSAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SSMSAWR extends SSMSAW {
    private volatile long refreshAfterWriteNanos;

    SSMSAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class SSMSR extends SSMS {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    SSMSR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSMSW extends SSMS {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SSMSW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SSMSWR extends SSMSW {
    private volatile long refreshAfterWriteNanos;

    SSMSWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSMW extends SS {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SSMW.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SSMW.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SSMW.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SSMW.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SSMW.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SSMW.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    SSMW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected boolean fastpath() {
      return true;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class SSMWA extends SSMW {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    SSMWA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected boolean fastpath() {
      return false;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class SSMWAR extends SSMWA {
    private volatile long refreshAfterWriteNanos;

    SSMWAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSMWAW extends SSMWA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SSMWAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SSMWAWR extends SSMWAW {
    private volatile long refreshAfterWriteNanos;

    SSMWAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class SSMWR extends SSMW {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    SSMWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSMWW extends SSMW {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SSMWW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SSMWWR extends SSMWW {
    private volatile long refreshAfterWriteNanos;

    SSMWWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class SSR extends SS {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    SSR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class SSS extends SS {
    private final StatsCounter statsCounter;

    SSS(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.statsCounter = builder.getStatsCounterSupplier().get();
    }

    public final boolean isRecordingStats() {
      return true;
    }

    public final Ticker statsTicker() {
      return Ticker.systemTicker();
    }

    public final StatsCounter statsCounter() {
      return statsCounter;
    }
  }

  static class SSSA extends SSS {
    private final Ticker ticker;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private volatile long expiresAfterAccessNanos;

    private final WriteBuffer writeBuffer;

    SSSA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class SSSAR extends SSSA {
    private volatile long refreshAfterWriteNanos;

    SSSAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSSAW extends SSSA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SSSAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SSSAWR extends SSSAW {
    private volatile long refreshAfterWriteNanos;

    SSSAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSSMS extends SSS {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SSSMS.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SSSMS.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SSSMS.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SSSMS.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SSSMS.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SSSMS.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    SSSMS(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected boolean fastpath() {
      return true;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class SSSMSA extends SSSMS {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    SSSMSA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected boolean fastpath() {
      return false;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class SSSMSAR extends SSSMSA {
    private volatile long refreshAfterWriteNanos;

    SSSMSAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSSMSAW extends SSSMSA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SSSMSAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SSSMSAWR extends SSSMSAW {
    private volatile long refreshAfterWriteNanos;

    SSSMSAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class SSSMSR extends SSSMS {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    SSSMSR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSSMSW extends SSSMS {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SSSMSW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SSSMSWR extends SSSMSW {
    private volatile long refreshAfterWriteNanos;

    SSSMSWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSSMW extends SSS {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SSSMW.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SSSMW.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(SSSMW.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SSSMW.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SSSMW.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(SSSMW.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    SSSMW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected boolean fastpath() {
      return true;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class SSSMWA extends SSSMW {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    SSSMWA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected boolean fastpath() {
      return false;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class SSSMWAR extends SSSMWA {
    private volatile long refreshAfterWriteNanos;

    SSSMWAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSSMWAW extends SSSMWA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SSSMWAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SSSMWAWR extends SSSMWAW {
    private volatile long refreshAfterWriteNanos;

    SSSMWAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class SSSMWR extends SSSMW {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    SSSMWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSSMWW extends SSSMW {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    SSSMWW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class SSSMWWR extends SSSMWW {
    private volatile long refreshAfterWriteNanos;

    SSSMWWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class SSSR extends SSS {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    SSSR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class SSSW extends SSS {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    SSSW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class SSSWR extends SSSW {
    private volatile long refreshAfterWriteNanos;

    SSSWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class SSW extends SS {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    SSW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class SSWR extends SSW {
    private volatile long refreshAfterWriteNanos;

    SSWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WI extends BoundedLocalCache {
    private final ReferenceQueue keyReferenceQueue = new ReferenceQueue();

    private final ReferenceQueue valueReferenceQueue = new ReferenceQueue();

    WI(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
    }

    protected final ReferenceQueue keyReferenceQueue() {
      return keyReferenceQueue;
    }

    protected final boolean collectKeys() {
      return true;
    }

    protected final ReferenceQueue valueReferenceQueue() {
      return valueReferenceQueue;
    }

    protected final boolean collectValues() {
      return true;
    }
  }

  static class WIA extends WI {
    private final Ticker ticker;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private volatile long expiresAfterAccessNanos;

    private final WriteBuffer writeBuffer;

    WIA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class WIAR extends WIA {
    private volatile long refreshAfterWriteNanos;

    WIAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WIAW extends WIA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WIAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WIAWR extends WIAW {
    private volatile long refreshAfterWriteNanos;

    WIAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WILi extends WI {
    private final RemovalListener removalListener;

    WILi(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.removalListener = builder.getRemovalListener(async);
    }

    public final RemovalListener removalListener() {
      return removalListener;
    }

    public final boolean hasRemovalListener() {
      return true;
    }
  }

  static class WILiA extends WILi {
    private final Ticker ticker;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private volatile long expiresAfterAccessNanos;

    private final WriteBuffer writeBuffer;

    WILiA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class WILiAR extends WILiA {
    private volatile long refreshAfterWriteNanos;

    WILiAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WILiAW extends WILiA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WILiAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WILiAWR extends WILiAW {
    private volatile long refreshAfterWriteNanos;

    WILiAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WILiMS extends WILi {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WILiMS.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WILiMS.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WILiMS.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WILiMS.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WILiMS.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WILiMS.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    WILiMS(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class WILiMSA extends WILiMS {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    WILiMSA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class WILiMSAR extends WILiMSA {
    private volatile long refreshAfterWriteNanos;

    WILiMSAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WILiMSAW extends WILiMSA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WILiMSAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WILiMSAWR extends WILiMSAW {
    private volatile long refreshAfterWriteNanos;

    WILiMSAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class WILiMSR extends WILiMS {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    WILiMSR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WILiMSW extends WILiMS {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WILiMSW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WILiMSWR extends WILiMSW {
    private volatile long refreshAfterWriteNanos;

    WILiMSWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WILiMW extends WILi {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WILiMW.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WILiMW.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WILiMW.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WILiMW.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WILiMW.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WILiMW.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    WILiMW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class WILiMWA extends WILiMW {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    WILiMWA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class WILiMWAR extends WILiMWA {
    private volatile long refreshAfterWriteNanos;

    WILiMWAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WILiMWAW extends WILiMWA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WILiMWAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WILiMWAWR extends WILiMWAW {
    private volatile long refreshAfterWriteNanos;

    WILiMWAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class WILiMWR extends WILiMW {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    WILiMWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WILiMWW extends WILiMW {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WILiMWW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WILiMWWR extends WILiMWW {
    private volatile long refreshAfterWriteNanos;

    WILiMWWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class WILiR extends WILi {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    WILiR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class WILiS extends WILi {
    private final StatsCounter statsCounter;

    WILiS(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.statsCounter = builder.getStatsCounterSupplier().get();
    }

    public final boolean isRecordingStats() {
      return true;
    }

    public final Ticker statsTicker() {
      return Ticker.systemTicker();
    }

    public final StatsCounter statsCounter() {
      return statsCounter;
    }
  }

  static class WILiSA extends WILiS {
    private final Ticker ticker;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private volatile long expiresAfterAccessNanos;

    private final WriteBuffer writeBuffer;

    WILiSA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class WILiSAR extends WILiSA {
    private volatile long refreshAfterWriteNanos;

    WILiSAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WILiSAW extends WILiSA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WILiSAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WILiSAWR extends WILiSAW {
    private volatile long refreshAfterWriteNanos;

    WILiSAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WILiSMS extends WILiS {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WILiSMS.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WILiSMS.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WILiSMS.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WILiSMS.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WILiSMS.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WILiSMS.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    WILiSMS(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class WILiSMSA extends WILiSMS {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    WILiSMSA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class WILiSMSAR extends WILiSMSA {
    private volatile long refreshAfterWriteNanos;

    WILiSMSAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WILiSMSAW extends WILiSMSA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WILiSMSAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WILiSMSAWR extends WILiSMSAW {
    private volatile long refreshAfterWriteNanos;

    WILiSMSAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class WILiSMSR extends WILiSMS {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    WILiSMSR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WILiSMSW extends WILiSMS {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WILiSMSW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WILiSMSWR extends WILiSMSW {
    private volatile long refreshAfterWriteNanos;

    WILiSMSWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WILiSMW extends WILiS {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WILiSMW.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WILiSMW.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WILiSMW.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WILiSMW.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WILiSMW.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WILiSMW.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    WILiSMW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class WILiSMWA extends WILiSMW {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    WILiSMWA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class WILiSMWAR extends WILiSMWA {
    private volatile long refreshAfterWriteNanos;

    WILiSMWAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WILiSMWAW extends WILiSMWA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WILiSMWAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WILiSMWAWR extends WILiSMWAW {
    private volatile long refreshAfterWriteNanos;

    WILiSMWAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class WILiSMWR extends WILiSMW {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    WILiSMWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WILiSMWW extends WILiSMW {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WILiSMWW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WILiSMWWR extends WILiSMWW {
    private volatile long refreshAfterWriteNanos;

    WILiSMWWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class WILiSR extends WILiS {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    WILiSR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class WILiSW extends WILiS {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    WILiSW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class WILiSWR extends WILiSW {
    private volatile long refreshAfterWriteNanos;

    WILiSWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WILiW extends WILi {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    WILiW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class WILiWR extends WILiW {
    private volatile long refreshAfterWriteNanos;

    WILiWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WIMS extends WI {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WIMS.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WIMS.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WIMS.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WIMS.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WIMS.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WIMS.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    WIMS(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class WIMSA extends WIMS {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    WIMSA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class WIMSAR extends WIMSA {
    private volatile long refreshAfterWriteNanos;

    WIMSAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WIMSAW extends WIMSA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WIMSAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WIMSAWR extends WIMSAW {
    private volatile long refreshAfterWriteNanos;

    WIMSAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class WIMSR extends WIMS {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    WIMSR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WIMSW extends WIMS {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WIMSW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WIMSWR extends WIMSW {
    private volatile long refreshAfterWriteNanos;

    WIMSWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WIMW extends WI {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WIMW.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WIMW.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WIMW.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WIMW.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WIMW.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WIMW.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    WIMW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class WIMWA extends WIMW {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    WIMWA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class WIMWAR extends WIMWA {
    private volatile long refreshAfterWriteNanos;

    WIMWAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WIMWAW extends WIMWA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WIMWAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WIMWAWR extends WIMWAW {
    private volatile long refreshAfterWriteNanos;

    WIMWAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class WIMWR extends WIMW {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    WIMWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WIMWW extends WIMW {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WIMWW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WIMWWR extends WIMWW {
    private volatile long refreshAfterWriteNanos;

    WIMWWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class WIR extends WI {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    WIR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class WIS extends WI {
    private final StatsCounter statsCounter;

    WIS(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.statsCounter = builder.getStatsCounterSupplier().get();
    }

    public final boolean isRecordingStats() {
      return true;
    }

    public final Ticker statsTicker() {
      return Ticker.systemTicker();
    }

    public final StatsCounter statsCounter() {
      return statsCounter;
    }
  }

  static class WISA extends WIS {
    private final Ticker ticker;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private volatile long expiresAfterAccessNanos;

    private final WriteBuffer writeBuffer;

    WISA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class WISAR extends WISA {
    private volatile long refreshAfterWriteNanos;

    WISAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WISAW extends WISA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WISAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WISAWR extends WISAW {
    private volatile long refreshAfterWriteNanos;

    WISAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WISMS extends WIS {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WISMS.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WISMS.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WISMS.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WISMS.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WISMS.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WISMS.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    WISMS(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class WISMSA extends WISMS {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    WISMSA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class WISMSAR extends WISMSA {
    private volatile long refreshAfterWriteNanos;

    WISMSAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WISMSAW extends WISMSA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WISMSAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WISMSAWR extends WISMSAW {
    private volatile long refreshAfterWriteNanos;

    WISMSAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class WISMSR extends WISMS {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    WISMSR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WISMSW extends WISMS {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WISMSW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WISMSWR extends WISMSW {
    private volatile long refreshAfterWriteNanos;

    WISMSWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WISMW extends WIS {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WISMW.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WISMW.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WISMW.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WISMW.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WISMW.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WISMW.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    WISMW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class WISMWA extends WISMW {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    WISMWA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class WISMWAR extends WISMWA {
    private volatile long refreshAfterWriteNanos;

    WISMWAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WISMWAW extends WISMWA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WISMWAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WISMWAWR extends WISMWAW {
    private volatile long refreshAfterWriteNanos;

    WISMWAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class WISMWR extends WISMW {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    WISMWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WISMWW extends WISMW {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WISMWW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WISMWWR extends WISMWW {
    private volatile long refreshAfterWriteNanos;

    WISMWWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class WISR extends WIS {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    WISR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class WISW extends WIS {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    WISW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class WISWR extends WISW {
    private volatile long refreshAfterWriteNanos;

    WISWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WIW extends WI {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    WIW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class WIWR extends WIW {
    private volatile long refreshAfterWriteNanos;

    WIWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WS extends BoundedLocalCache {
    private final ReferenceQueue keyReferenceQueue = new ReferenceQueue();

    WS(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
    }

    protected final ReferenceQueue keyReferenceQueue() {
      return keyReferenceQueue;
    }

    protected final boolean collectKeys() {
      return true;
    }
  }

  static class WSA extends WS {
    private final Ticker ticker;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private volatile long expiresAfterAccessNanos;

    private final WriteBuffer writeBuffer;

    WSA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class WSAR extends WSA {
    private volatile long refreshAfterWriteNanos;

    WSAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSAW extends WSA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WSAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WSAWR extends WSAW {
    private volatile long refreshAfterWriteNanos;

    WSAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSLi extends WS {
    private final RemovalListener removalListener;

    WSLi(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.removalListener = builder.getRemovalListener(async);
    }

    public final RemovalListener removalListener() {
      return removalListener;
    }

    public final boolean hasRemovalListener() {
      return true;
    }
  }

  static class WSLiA extends WSLi {
    private final Ticker ticker;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private volatile long expiresAfterAccessNanos;

    private final WriteBuffer writeBuffer;

    WSLiA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class WSLiAR extends WSLiA {
    private volatile long refreshAfterWriteNanos;

    WSLiAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSLiAW extends WSLiA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WSLiAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WSLiAWR extends WSLiAW {
    private volatile long refreshAfterWriteNanos;

    WSLiAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSLiMS extends WSLi {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WSLiMS.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WSLiMS.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WSLiMS.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WSLiMS.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WSLiMS.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WSLiMS.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    WSLiMS(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class WSLiMSA extends WSLiMS {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    WSLiMSA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class WSLiMSAR extends WSLiMSA {
    private volatile long refreshAfterWriteNanos;

    WSLiMSAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSLiMSAW extends WSLiMSA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WSLiMSAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WSLiMSAWR extends WSLiMSAW {
    private volatile long refreshAfterWriteNanos;

    WSLiMSAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class WSLiMSR extends WSLiMS {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    WSLiMSR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSLiMSW extends WSLiMS {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WSLiMSW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WSLiMSWR extends WSLiMSW {
    private volatile long refreshAfterWriteNanos;

    WSLiMSWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSLiMW extends WSLi {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WSLiMW.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WSLiMW.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WSLiMW.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WSLiMW.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WSLiMW.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WSLiMW.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    WSLiMW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class WSLiMWA extends WSLiMW {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    WSLiMWA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class WSLiMWAR extends WSLiMWA {
    private volatile long refreshAfterWriteNanos;

    WSLiMWAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSLiMWAW extends WSLiMWA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WSLiMWAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WSLiMWAWR extends WSLiMWAW {
    private volatile long refreshAfterWriteNanos;

    WSLiMWAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class WSLiMWR extends WSLiMW {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    WSLiMWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSLiMWW extends WSLiMW {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WSLiMWW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WSLiMWWR extends WSLiMWW {
    private volatile long refreshAfterWriteNanos;

    WSLiMWWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class WSLiR extends WSLi {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    WSLiR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class WSLiS extends WSLi {
    private final StatsCounter statsCounter;

    WSLiS(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.statsCounter = builder.getStatsCounterSupplier().get();
    }

    public final boolean isRecordingStats() {
      return true;
    }

    public final Ticker statsTicker() {
      return Ticker.systemTicker();
    }

    public final StatsCounter statsCounter() {
      return statsCounter;
    }
  }

  static class WSLiSA extends WSLiS {
    private final Ticker ticker;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private volatile long expiresAfterAccessNanos;

    private final WriteBuffer writeBuffer;

    WSLiSA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class WSLiSAR extends WSLiSA {
    private volatile long refreshAfterWriteNanos;

    WSLiSAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSLiSAW extends WSLiSA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WSLiSAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WSLiSAWR extends WSLiSAW {
    private volatile long refreshAfterWriteNanos;

    WSLiSAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSLiSMS extends WSLiS {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WSLiSMS.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WSLiSMS.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WSLiSMS.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WSLiSMS.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WSLiSMS.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WSLiSMS.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    WSLiSMS(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class WSLiSMSA extends WSLiSMS {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    WSLiSMSA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class WSLiSMSAR extends WSLiSMSA {
    private volatile long refreshAfterWriteNanos;

    WSLiSMSAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSLiSMSAW extends WSLiSMSA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WSLiSMSAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WSLiSMSAWR extends WSLiSMSAW {
    private volatile long refreshAfterWriteNanos;

    WSLiSMSAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class WSLiSMSR extends WSLiSMS {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    WSLiSMSR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSLiSMSW extends WSLiSMS {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WSLiSMSW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WSLiSMSWR extends WSLiSMSW {
    private volatile long refreshAfterWriteNanos;

    WSLiSMSWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSLiSMW extends WSLiS {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WSLiSMW.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WSLiSMW.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WSLiSMW.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WSLiSMW.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WSLiSMW.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WSLiSMW.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    WSLiSMW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class WSLiSMWA extends WSLiSMW {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    WSLiSMWA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class WSLiSMWAR extends WSLiSMWA {
    private volatile long refreshAfterWriteNanos;

    WSLiSMWAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSLiSMWAW extends WSLiSMWA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WSLiSMWAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WSLiSMWAWR extends WSLiSMWAW {
    private volatile long refreshAfterWriteNanos;

    WSLiSMWAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class WSLiSMWR extends WSLiSMW {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    WSLiSMWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSLiSMWW extends WSLiSMW {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WSLiSMWW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WSLiSMWWR extends WSLiSMWW {
    private volatile long refreshAfterWriteNanos;

    WSLiSMWWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class WSLiSR extends WSLiS {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    WSLiSR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class WSLiSW extends WSLiS {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    WSLiSW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class WSLiSWR extends WSLiSW {
    private volatile long refreshAfterWriteNanos;

    WSLiSWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSLiW extends WSLi {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    WSLiW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class WSLiWR extends WSLiW {
    private volatile long refreshAfterWriteNanos;

    WSLiWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSMS extends WS {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WSMS.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WSMS.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WSMS.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WSMS.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WSMS.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WSMS.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    WSMS(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class WSMSA extends WSMS {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    WSMSA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class WSMSAR extends WSMSA {
    private volatile long refreshAfterWriteNanos;

    WSMSAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSMSAW extends WSMSA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WSMSAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WSMSAWR extends WSMSAW {
    private volatile long refreshAfterWriteNanos;

    WSMSAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class WSMSR extends WSMS {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    WSMSR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSMSW extends WSMS {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WSMSW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WSMSWR extends WSMSW {
    private volatile long refreshAfterWriteNanos;

    WSMSWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSMW extends WS {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WSMW.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WSMW.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WSMW.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WSMW.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WSMW.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WSMW.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    WSMW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class WSMWA extends WSMW {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    WSMWA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class WSMWAR extends WSMWA {
    private volatile long refreshAfterWriteNanos;

    WSMWAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSMWAW extends WSMWA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WSMWAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WSMWAWR extends WSMWAW {
    private volatile long refreshAfterWriteNanos;

    WSMWAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class WSMWR extends WSMW {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    WSMWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSMWW extends WSMW {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WSMWW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WSMWWR extends WSMWW {
    private volatile long refreshAfterWriteNanos;

    WSMWWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class WSR extends WS {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    WSR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class WSS extends WS {
    private final StatsCounter statsCounter;

    WSS(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.statsCounter = builder.getStatsCounterSupplier().get();
    }

    public final boolean isRecordingStats() {
      return true;
    }

    public final Ticker statsTicker() {
      return Ticker.systemTicker();
    }

    public final StatsCounter statsCounter() {
      return statsCounter;
    }
  }

  static class WSSA extends WSS {
    private final Ticker ticker;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private volatile long expiresAfterAccessNanos;

    private final WriteBuffer writeBuffer;

    WSSA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class WSSAR extends WSSA {
    private volatile long refreshAfterWriteNanos;

    WSSAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSSAW extends WSSA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WSSAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WSSAWR extends WSSAW {
    private volatile long refreshAfterWriteNanos;

    WSSAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSSMS extends WSS {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WSSMS.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WSSMS.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WSSMS.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WSSMS.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WSSMS.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WSSMS.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    WSSMS(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class WSSMSA extends WSSMS {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    WSSMSA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class WSSMSAR extends WSSMSA {
    private volatile long refreshAfterWriteNanos;

    WSSMSAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSSMSAW extends WSSMSA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WSSMSAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WSSMSAWR extends WSSMSAW {
    private volatile long refreshAfterWriteNanos;

    WSSMSAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class WSSMSR extends WSSMS {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    WSSMSR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSSMSW extends WSSMS {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WSSMSW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WSSMSWR extends WSSMSW {
    private volatile long refreshAfterWriteNanos;

    WSSMSWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSSMW extends WSS {
    protected static final long MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WSSMW.class, "maximum");

    protected static final long EDEN_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WSSMW.class, "edenMaximum");

    protected static final long MAIN_PROTECTED_MAXIMUM_OFFSET = UnsafeAccess.objectFieldOffset(WSSMW.class, "mainProtectedMaximum");

    protected static final long WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WSSMW.class, "weightedSize");

    protected static final long EDEN_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WSSMW.class, "edenWeightedSize");

    protected static final long MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET = UnsafeAccess.objectFieldOffset(WSSMW.class, "mainProtectedWeightedSize");

    private volatile long maximum;

    private volatile long edenMaximum;

    private volatile long mainProtectedMaximum;

    private volatile long weightedSize;

    private volatile long edenWeightedSize;

    private volatile long mainProtectedWeightedSize;

    private final FrequencySketch sketch;

    private final AccessOrderDeque> accessOrderEdenDeque;

    private final AccessOrderDeque> accessOrderProbationDeque;

    private final AccessOrderDeque> accessOrderProtectedDeque;

    private final WriteBuffer writeBuffer;

    WSSMW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.sketch = new FrequencySketch();
      if (builder.hasInitialCapacity()) {
        long capacity = Math.min(builder.getMaximum(), builder.getInitialCapacity());
        this.sketch.ensureCapacity(capacity);
      }
      this.accessOrderEdenDeque = new AccessOrderDeque>();
      this.accessOrderProbationDeque = new AccessOrderDeque>();
      this.accessOrderProtectedDeque = new AccessOrderDeque>();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    protected final boolean evicts() {
      return true;
    }

    protected final long maximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAXIMUM_OFFSET);
    }

    protected final void lazySetMaximum(long maximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAXIMUM_OFFSET, maximum);
    }

    protected final long edenMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_MAXIMUM_OFFSET);
    }

    protected final void lazySetEdenMaximum(long edenMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_MAXIMUM_OFFSET, edenMaximum);
    }

    protected final long mainProtectedMaximum() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET);
    }

    protected final void lazySetMainProtectedMaximum(long mainProtectedMaximum) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_MAXIMUM_OFFSET, mainProtectedMaximum);
    }

    protected final long weightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetWeightedSize(long weightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, WEIGHTED_SIZE_OFFSET, weightedSize);
    }

    protected final long edenWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, EDEN_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetEdenWeightedSize(long edenWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, EDEN_WEIGHTED_SIZE_OFFSET, edenWeightedSize);
    }

    protected final long mainProtectedWeightedSize() {
      return UnsafeAccess.UNSAFE.getLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET);
    }

    protected final void lazySetMainProtectedWeightedSize(long mainProtectedWeightedSize) {
      UnsafeAccess.UNSAFE.putLong(this, MAIN_PROTECTED_WEIGHTED_SIZE_OFFSET, mainProtectedWeightedSize);
    }

    protected final FrequencySketch frequencySketch() {
      return sketch;
    }

    protected final AccessOrderDeque> accessOrderEdenDeque() {
      return accessOrderEdenDeque;
    }

    protected final AccessOrderDeque> accessOrderProbationDeque() {
      return accessOrderProbationDeque;
    }

    protected final AccessOrderDeque> accessOrderProtectedDeque() {
      return accessOrderProtectedDeque;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class WSSMWA extends WSSMW {
    private final Ticker ticker;

    private volatile long expiresAfterAccessNanos;

    WSSMWA(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.expiresAfterAccessNanos = builder.getExpiresAfterAccessNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean expiresAfterAccess() {
      return true;
    }

    protected final long expiresAfterAccessNanos() {
      return expiresAfterAccessNanos;
    }

    protected final void setExpiresAfterAccessNanos(long expiresAfterAccessNanos) {
      this.expiresAfterAccessNanos = expiresAfterAccessNanos;
    }
  }

  static final class WSSMWAR extends WSSMWA {
    private volatile long refreshAfterWriteNanos;

    WSSMWAR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSSMWAW extends WSSMWA {
    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WSSMWAW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WSSMWAWR extends WSSMWAW {
    private volatile long refreshAfterWriteNanos;

    WSSMWAWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class WSSMWR extends WSSMW {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    WSSMWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSSMWW extends WSSMW {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    WSSMWW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }
  }

  static final class WSSMWWR extends WSSMWW {
    private volatile long refreshAfterWriteNanos;

    WSSMWWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static final class WSSR extends WSS {
    private final Ticker ticker;

    private volatile long refreshAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    WSSR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static class WSSW extends WSS {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    WSSW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class WSSWR extends WSSW {
    private volatile long refreshAfterWriteNanos;

    WSSWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }

  static class WSW extends WS {
    private final Ticker ticker;

    private final WriteOrderDeque> writeOrderDeque;

    private volatile long expiresAfterWriteNanos;

    private final WriteBuffer writeBuffer;

    WSW(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.ticker = builder.getTicker();
      this.writeOrderDeque = new WriteOrderDeque>();
      this.expiresAfterWriteNanos = builder.getExpiresAfterWriteNanos();
      this.writeBuffer = new WriteBuffer<>(WRITE_BUFFER_MIN, WRITE_BUFFER_MAX);
    }

    public final Ticker expirationTicker() {
      return ticker;
    }

    protected final WriteOrderDeque> writeOrderDeque() {
      return writeOrderDeque;
    }

    protected final boolean expiresAfterWrite() {
      return true;
    }

    protected final long expiresAfterWriteNanos() {
      return expiresAfterWriteNanos;
    }

    protected final void setExpiresAfterWriteNanos(long expiresAfterWriteNanos) {
      this.expiresAfterWriteNanos = expiresAfterWriteNanos;
    }

    protected final WriteBuffer writeBuffer() {
      return writeBuffer;
    }

    protected final boolean buffersWrites() {
      return true;
    }
  }

  static final class WSWR extends WSW {
    private volatile long refreshAfterWriteNanos;

    WSWR(Caffeine builder, CacheLoader cacheLoader, boolean async) {
      super(builder, (CacheLoader) cacheLoader, async);
      this.refreshAfterWriteNanos = builder.getRefreshAfterWriteNanos();
    }

    protected final boolean refreshAfterWrite() {
      return true;
    }

    protected final long refreshAfterWriteNanos() {
      return refreshAfterWriteNanos;
    }

    protected final void setRefreshAfterWriteNanos(long refreshAfterWriteNanos) {
      this.refreshAfterWriteNanos = refreshAfterWriteNanos;
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy