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

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

There is a newer version: 9.1.7.Final
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.References.LookupKeyReference;
import com.github.benmanes.caffeine.cache.References.SoftValueReference;
import com.github.benmanes.caffeine.cache.References.WeakKeyReference;
import com.github.benmanes.caffeine.cache.References.WeakValueReference;
import java.lang.Object;
import java.lang.String;
import java.lang.StringBuilder;
import java.lang.SuppressWarnings;
import java.lang.ref.Reference;
import java.lang.ref.ReferenceQueue;
import java.util.Objects;

/**
 * WARNING: GENERATED CODE
 *
 * A factory for cache nodes optimized for a particular configuration.
 *
 * @author [email protected] (Ben Manes)
 */
@SuppressWarnings({"unchecked", "PMD", "GuardedByChecker", "MissingOverride"})
enum NodeFactory {
  SSo {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSo<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSo<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SSoA {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoA<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoA<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SSoAMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoAMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoAMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SSoAMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoAMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoAMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SSoAR {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoAR<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoAR<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SSoARMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoARMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoARMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SSoARMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoARMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoARMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SSoAW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoAW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoAW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SSoAWMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoAWMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoAWMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SSoAWMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoAWMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoAWMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SSoAWR {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoAWR<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoAWR<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SSoAWRMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoAWRMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoAWRMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SSoAWRMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoAWRMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoAWRMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SSoMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SSoMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SSoR {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoR<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoR<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SSoRMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoRMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoRMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SSoRMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoRMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoRMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SSoW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SSoWMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoWMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoWMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SSoWMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoWMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoWMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SSoWR {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoWR<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoWR<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SSoWRMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoWRMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoWRMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SSoWRMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoWRMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSoWRMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SSt {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSt<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SSt<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SStA {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStA<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStA<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SStAMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStAMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStAMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SStAMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStAMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStAMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SStAR {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStAR<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStAR<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SStARMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStARMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStARMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SStARMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStARMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStARMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SStAW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStAW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStAW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SStAWMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStAWMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStAWMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SStAWMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStAWMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStAWMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SStAWR {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStAWR<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStAWR<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SStAWRMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStAWRMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStAWRMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SStAWRMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStAWRMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStAWRMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SStMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SStMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SStR {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStR<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStR<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SStRMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStRMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStRMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SStRMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStRMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStRMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SStW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SStWMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStWMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStWMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SStWMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStWMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStWMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SStWR {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStWR<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStWR<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SStWRMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStWRMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStWRMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SStWRMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStWRMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SStWRMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SWA {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWA<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWA<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SWAMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWAMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWAMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SWAMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWAMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWAMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SWAR {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWAR<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWAR<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SWARMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWARMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWARMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SWARMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWARMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWARMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SWAW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWAW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWAW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SWAWMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWAWMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWAWMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SWAWMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWAWMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWAWMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SWAWR {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWAWR<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWAWR<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SWAWRMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWAWRMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWAWRMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SWAWRMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWAWRMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWAWRMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SWMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SWMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SWR {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWR<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWR<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SWRMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWRMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWRMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SWRMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWRMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWRMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SWW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SWWMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWWMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWWMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SWWMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWWMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWWMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SWWR {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWWR<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWWR<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SWWRMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWWRMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWWRMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  SWWRMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWWRMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new SWWRMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }
  },

  WSo {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSo<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSo<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WSoA {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoA<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoA<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WSoAMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoAMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoAMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WSoAMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoAMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoAMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WSoAR {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoAR<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoAR<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WSoARMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoARMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoARMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WSoARMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoARMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoARMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WSoAW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoAW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoAW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WSoAWMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoAWMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoAWMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WSoAWMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoAWMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoAWMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WSoAWR {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoAWR<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoAWR<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WSoAWRMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoAWRMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoAWRMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WSoAWRMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoAWRMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoAWRMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WSoMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WSoMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WSoR {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoR<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoR<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WSoRMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoRMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoRMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WSoRMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoRMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoRMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WSoW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WSoWMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoWMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoWMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WSoWMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoWMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoWMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WSoWR {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoWR<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoWR<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WSoWRMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoWRMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoWRMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WSoWRMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoWRMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSoWRMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WSt {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSt<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WSt<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WStA {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStA<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStA<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WStAMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStAMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStAMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WStAMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStAMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStAMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WStAR {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStAR<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStAR<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WStARMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStARMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStARMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WStARMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStARMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStARMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WStAW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStAW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStAW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WStAWMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStAWMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStAWMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WStAWMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStAWMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStAWMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WStAWR {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStAWR<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStAWR<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WStAWRMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStAWRMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStAWRMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WStAWRMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStAWRMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStAWRMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WStMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WStMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WStR {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStR<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStR<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WStRMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStRMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStRMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WStRMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStRMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStRMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WStW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WStWMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStWMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStWMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WStWMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStWMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStWMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WStWR {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStWR<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStWR<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WStWRMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStWRMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStWRMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WStWRMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStWRMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WStWRMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WWA {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWA<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWA<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WWAMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWAMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWAMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WWAMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWAMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWAMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WWAR {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWAR<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWAR<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WWARMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWARMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWARMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WWARMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWARMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWARMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WWAW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWAW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWAW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WWAWMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWAWMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWAWMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WWAWMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWAWMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWAWMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WWAWR {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWAWR<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWAWR<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WWAWRMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWAWRMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWAWRMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WWAWRMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWAWRMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWAWRMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WWMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WWMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WWR {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWR<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWR<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WWRMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWRMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWRMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WWRMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWRMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWRMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WWW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WWWMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWWMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWWMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WWWMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWWMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWWMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WWWR {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWWR<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWWR<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WWWRMS {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWWRMS<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWWRMS<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  },

  WWWRMW {
     Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWWRMW<>(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

     Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      return new WWWRMW<>(keyReference, value, valueReferenceQueue, weight, now);
    }

     Object newLookupKey(K key) {
      return new LookupKeyReference(key);
    }

     Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
      return new WeakKeyReference(key, referenceQueue);
    }
  };

  private static final Object RETIRED_STRONG_KEY = new Object();

  private static final Object DEAD_STRONG_KEY = new Object();

  private static final WeakKeyReference RETIRED_WEAK_KEY = new WeakKeyReference(null, null);

  private static final WeakKeyReference DEAD_WEAK_KEY = new WeakKeyReference(null, null);

  /**
   * Returns a node optimized for the specified features.
   */
  abstract  Node newNode(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now);

  /**
   * Returns a node optimized for the specified features.
   */
  abstract  Node newNode(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now);

  /**
   * Returns a key suitable for looking up an entry in the cache. If the cache holds keys strongly
   * then the key is returned. If the cache holds keys weakly then a {@link LookupKeyReference}
   * holding the key argument is returned.
   */
   Object newLookupKey(K key) {
    return key;
  }

  /**
   * Returns a key suitable for inserting into the cache. If the cache holds keys strongly then
   * the key is returned. If the cache holds keys weakly then a {@link WeakKeyReference}
   * holding the key argument is returned.
   */
   Object newReferenceKey(K key, ReferenceQueue referenceQueue) {
    return key;
  }

  /**
   * Returns whether this factory supports the weak values.
   */
  boolean weakValues() {
    return name().matches(".W.*");
  }

  /**
   * Returns whether this factory supports the soft values.
   */
  boolean softValues() {
    return name().matches(".So.*");
  }

  /**
   * Returns a factory optimized for the specified features.
   */
  static NodeFactory getFactory(boolean strongKeys, boolean weakKeys, boolean strongValues, boolean weakValues, boolean softValues, boolean expiresAfterAccess, boolean expiresAfterWrite, boolean refreshAfterWrite, boolean maximumSize, boolean weighed) {
    StringBuilder sb = new StringBuilder();
    if (strongKeys) {
      sb.append('S');
    } else {
      sb.append('W');
    }
    if (strongValues) {
      sb.append("St");
    } else if (weakValues) {
      sb.append('W');
    } else {
      sb.append("So");
    }
    if (expiresAfterAccess) {
      sb.append('A');
    }
    if (expiresAfterWrite) {
      sb.append('W');
    }
    if (refreshAfterWrite) {
      sb.append('R');
    }
    if (maximumSize) {
      sb.append('M');
      if (weighed) {
        sb.append('W');
      } else {
        sb.append('S');
      }
    }
    return valueOf(sb.toString());
  }

  static class SSo implements Node {
    protected static final long KEY_OFFSET = UnsafeAccess.objectFieldOffset(SSo.class, "key");

    protected static final long VALUE_OFFSET = UnsafeAccess.objectFieldOffset(SSo.class, "value");

    private volatile K key;

    private volatile SoftValueReference value;

    SSo(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      UnsafeAccess.UNSAFE.putObject(this, KEY_OFFSET, key);
      UnsafeAccess.UNSAFE.putObject(this, VALUE_OFFSET, new SoftValueReference(key, value, valueReferenceQueue));
    }

    SSo(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      UnsafeAccess.UNSAFE.putObject(this, KEY_OFFSET, (K) keyReference);
      UnsafeAccess.UNSAFE.putObject(this, VALUE_OFFSET, new SoftValueReference(keyReference, value, valueReferenceQueue));
    }

    public final K getKey() {
      return (K) UnsafeAccess.UNSAFE.getObject(this, KEY_OFFSET);
    }

    public final Object getKeyReference() {
      return UnsafeAccess.UNSAFE.getObject(this, KEY_OFFSET);
    }

    public final V getValue() {
      return ((Reference) UnsafeAccess.UNSAFE.getObject(this, VALUE_OFFSET)).get();
    }

    public final Object getValueReference() {
      return UnsafeAccess.UNSAFE.getObject(this, VALUE_OFFSET);
    }

    public final void setValue(V value, ReferenceQueue referenceQueue) {
      ((Reference) getValueReference()).clear();
      UnsafeAccess.UNSAFE.putObject(this, VALUE_OFFSET, new SoftValueReference(key, value, referenceQueue));
    }

    public final boolean containsValue(Object value) {
      return getValue() == value;
    }

    public final boolean isAlive() {
      Object key = getKeyReference();
      return (key != RETIRED_STRONG_KEY) && (key != DEAD_STRONG_KEY);
    }

    public final boolean isRetired() {
      return (getKeyReference() == RETIRED_STRONG_KEY);
    }

    public final void retire() {
      ((Reference) getValueReference()).clear();
      UnsafeAccess.UNSAFE.putObject(this, KEY_OFFSET, RETIRED_STRONG_KEY);
    }

    public final boolean isDead() {
      return (getKeyReference() == DEAD_STRONG_KEY);
    }

    public final void die() {
      ((Reference) getValueReference()).clear();
      UnsafeAccess.UNSAFE.putObject(this, KEY_OFFSET, DEAD_STRONG_KEY);
    }

    public final String toString() {
      return String.format("%s=[key=%s, value=%s, weight=%d, queueType=%,d, accessTimeNS=%,d, "
          + "writeTimeNS=%,d, prevInAccess=%s, nextInAccess=%s, prevInWrite=%s, nextInWrite=%s]",
          getClass().getSimpleName(), getKey(), getValue(), getWeight(), getQueueType(), 
          getAccessTime(), getWriteTime(), getPreviousInAccessOrder() != null,
          getNextInAccessOrder() != null, getPreviousInWriteOrder() != null,
          getNextInWriteOrder() != null);
    }
  }

  static class SSoA extends SSo {
    protected static final long ACCESS_TIME_OFFSET = UnsafeAccess.objectFieldOffset(SSoA.class, "accessTime");

    private volatile long accessTime;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    SSoA(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, ACCESS_TIME_OFFSET, now);
    }

    SSoA(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, ACCESS_TIME_OFFSET, now);
    }

    public final long getAccessTime() {
      return UnsafeAccess.UNSAFE.getLong(this, ACCESS_TIME_OFFSET);
    }

    public final void setAccessTime(long accessTime) {
      UnsafeAccess.UNSAFE.putLong(this, ACCESS_TIME_OFFSET, accessTime);
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class SSoAMS extends SSoA {
    private int queueType;

    SSoAMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SSoAMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }
  }

  static final class SSoAMW extends SSoA {
    private int queueType;

    private int weight;

    private int policyWeight;

    SSoAMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    SSoAMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }
  }

  static class SSoAR extends SSoA {
    protected static final long WRITE_TIME_OFFSET = UnsafeAccess.objectFieldOffset(SSoAR.class, "writeTime");

    private volatile long writeTime;

    SSoAR(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    SSoAR(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    public final long getWriteTime() {
      return UnsafeAccess.UNSAFE.getLong(this, WRITE_TIME_OFFSET);
    }

    public final void setWriteTime(long writeTime) {
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, writeTime);
    }

    public final boolean casWriteTime(long expect, long update) {
      return UnsafeAccess.UNSAFE.compareAndSwapLong(this, WRITE_TIME_OFFSET, expect, update);
    }
  }

  static final class SSoARMS extends SSoAR {
    private int queueType;

    SSoARMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SSoARMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }
  }

  static final class SSoARMW extends SSoAR {
    private int queueType;

    private int weight;

    private int policyWeight;

    SSoARMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    SSoARMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }
  }

  static class SSoAW extends SSoA {
    protected static final long WRITE_TIME_OFFSET = UnsafeAccess.objectFieldOffset(SSoAW.class, "writeTime");

    private volatile long writeTime;

    private Node previousInWriteOrder;

    private Node nextInWriteOrder;

    SSoAW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    SSoAW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    public final long getWriteTime() {
      return UnsafeAccess.UNSAFE.getLong(this, WRITE_TIME_OFFSET);
    }

    public final void setWriteTime(long writeTime) {
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, writeTime);
    }

    public final Node getPreviousInWriteOrder() {
      return previousInWriteOrder;
    }

    public final void setPreviousInWriteOrder(Node previousInWriteOrder) {
      this.previousInWriteOrder = previousInWriteOrder;
    }

    public final Node getNextInWriteOrder() {
      return nextInWriteOrder;
    }

    public final void setNextInWriteOrder(Node nextInWriteOrder) {
      this.nextInWriteOrder = nextInWriteOrder;
    }
  }

  static final class SSoAWMS extends SSoAW {
    private int queueType;

    SSoAWMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SSoAWMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }
  }

  static final class SSoAWMW extends SSoAW {
    private int queueType;

    private int weight;

    private int policyWeight;

    SSoAWMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    SSoAWMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }
  }

  static class SSoAWR extends SSoAW {
    SSoAWR(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SSoAWR(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final boolean casWriteTime(long expect, long update) {
      return UnsafeAccess.UNSAFE.compareAndSwapLong(this, WRITE_TIME_OFFSET, expect, update);
    }
  }

  static final class SSoAWRMS extends SSoAWR {
    private int queueType;

    SSoAWRMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SSoAWRMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }
  }

  static final class SSoAWRMW extends SSoAWR {
    private int queueType;

    private int weight;

    private int policyWeight;

    SSoAWRMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    SSoAWRMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }
  }

  static final class SSoMS extends SSo {
    private int queueType;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    SSoMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SSoMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class SSoMW extends SSo {
    private int queueType;

    private int weight;

    private int policyWeight;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    SSoMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    SSoMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static class SSoR extends SSo {
    protected static final long WRITE_TIME_OFFSET = UnsafeAccess.objectFieldOffset(SSoR.class, "writeTime");

    private volatile long writeTime;

    SSoR(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    SSoR(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    public final long getWriteTime() {
      return UnsafeAccess.UNSAFE.getLong(this, WRITE_TIME_OFFSET);
    }

    public final void setWriteTime(long writeTime) {
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, writeTime);
    }

    public final boolean casWriteTime(long expect, long update) {
      return UnsafeAccess.UNSAFE.compareAndSwapLong(this, WRITE_TIME_OFFSET, expect, update);
    }
  }

  static final class SSoRMS extends SSoR {
    private int queueType;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    SSoRMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SSoRMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class SSoRMW extends SSoR {
    private int queueType;

    private int weight;

    private int policyWeight;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    SSoRMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    SSoRMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static class SSoW extends SSo {
    protected static final long WRITE_TIME_OFFSET = UnsafeAccess.objectFieldOffset(SSoW.class, "writeTime");

    private volatile long writeTime;

    private Node previousInWriteOrder;

    private Node nextInWriteOrder;

    SSoW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    SSoW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    public final long getWriteTime() {
      return UnsafeAccess.UNSAFE.getLong(this, WRITE_TIME_OFFSET);
    }

    public final void setWriteTime(long writeTime) {
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, writeTime);
    }

    public final Node getPreviousInWriteOrder() {
      return previousInWriteOrder;
    }

    public final void setPreviousInWriteOrder(Node previousInWriteOrder) {
      this.previousInWriteOrder = previousInWriteOrder;
    }

    public final Node getNextInWriteOrder() {
      return nextInWriteOrder;
    }

    public final void setNextInWriteOrder(Node nextInWriteOrder) {
      this.nextInWriteOrder = nextInWriteOrder;
    }
  }

  static final class SSoWMS extends SSoW {
    private int queueType;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    SSoWMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SSoWMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class SSoWMW extends SSoW {
    private int queueType;

    private int weight;

    private int policyWeight;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    SSoWMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    SSoWMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static class SSoWR extends SSoW {
    SSoWR(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SSoWR(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final boolean casWriteTime(long expect, long update) {
      return UnsafeAccess.UNSAFE.compareAndSwapLong(this, WRITE_TIME_OFFSET, expect, update);
    }
  }

  static final class SSoWRMS extends SSoWR {
    private int queueType;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    SSoWRMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SSoWRMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class SSoWRMW extends SSoWR {
    private int queueType;

    private int weight;

    private int policyWeight;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    SSoWRMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    SSoWRMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static class SSt implements Node {
    protected static final long KEY_OFFSET = UnsafeAccess.objectFieldOffset(SSt.class, "key");

    protected static final long VALUE_OFFSET = UnsafeAccess.objectFieldOffset(SSt.class, "value");

    private volatile K key;

    private volatile V value;

    SSt(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      UnsafeAccess.UNSAFE.putObject(this, KEY_OFFSET, key);
      UnsafeAccess.UNSAFE.putObject(this, VALUE_OFFSET, value);
    }

    SSt(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      UnsafeAccess.UNSAFE.putObject(this, KEY_OFFSET, (K) keyReference);
      UnsafeAccess.UNSAFE.putObject(this, VALUE_OFFSET, value);
    }

    public final K getKey() {
      return (K) UnsafeAccess.UNSAFE.getObject(this, KEY_OFFSET);
    }

    public final Object getKeyReference() {
      return UnsafeAccess.UNSAFE.getObject(this, KEY_OFFSET);
    }

    public final V getValue() {
      return (V) UnsafeAccess.UNSAFE.getObject(this, VALUE_OFFSET);
    }

    public final Object getValueReference() {
      return UnsafeAccess.UNSAFE.getObject(this, VALUE_OFFSET);
    }

    public final void setValue(V value, ReferenceQueue referenceQueue) {
      UnsafeAccess.UNSAFE.putObject(this, VALUE_OFFSET, value);
    }

    public final boolean containsValue(Object value) {
      return Objects.equals(value, getValue());
    }

    public final boolean isAlive() {
      Object key = getKeyReference();
      return (key != RETIRED_STRONG_KEY) && (key != DEAD_STRONG_KEY);
    }

    public final boolean isRetired() {
      return (getKeyReference() == RETIRED_STRONG_KEY);
    }

    public final void retire() {
      UnsafeAccess.UNSAFE.putObject(this, KEY_OFFSET, RETIRED_STRONG_KEY);
    }

    public final boolean isDead() {
      return (getKeyReference() == DEAD_STRONG_KEY);
    }

    public final void die() {
      UnsafeAccess.UNSAFE.putObject(this, VALUE_OFFSET, null);
      UnsafeAccess.UNSAFE.putObject(this, KEY_OFFSET, DEAD_STRONG_KEY);
    }

    public final String toString() {
      return String.format("%s=[key=%s, value=%s, weight=%d, queueType=%,d, accessTimeNS=%,d, "
          + "writeTimeNS=%,d, prevInAccess=%s, nextInAccess=%s, prevInWrite=%s, nextInWrite=%s]",
          getClass().getSimpleName(), getKey(), getValue(), getWeight(), getQueueType(), 
          getAccessTime(), getWriteTime(), getPreviousInAccessOrder() != null,
          getNextInAccessOrder() != null, getPreviousInWriteOrder() != null,
          getNextInWriteOrder() != null);
    }
  }

  static class SStA extends SSt {
    protected static final long ACCESS_TIME_OFFSET = UnsafeAccess.objectFieldOffset(SStA.class, "accessTime");

    private volatile long accessTime;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    SStA(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, ACCESS_TIME_OFFSET, now);
    }

    SStA(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, ACCESS_TIME_OFFSET, now);
    }

    public final long getAccessTime() {
      return UnsafeAccess.UNSAFE.getLong(this, ACCESS_TIME_OFFSET);
    }

    public final void setAccessTime(long accessTime) {
      UnsafeAccess.UNSAFE.putLong(this, ACCESS_TIME_OFFSET, accessTime);
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class SStAMS extends SStA {
    private int queueType;

    SStAMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SStAMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }
  }

  static final class SStAMW extends SStA {
    private int queueType;

    private int weight;

    private int policyWeight;

    SStAMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    SStAMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }
  }

  static class SStAR extends SStA {
    protected static final long WRITE_TIME_OFFSET = UnsafeAccess.objectFieldOffset(SStAR.class, "writeTime");

    private volatile long writeTime;

    SStAR(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    SStAR(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    public final long getWriteTime() {
      return UnsafeAccess.UNSAFE.getLong(this, WRITE_TIME_OFFSET);
    }

    public final void setWriteTime(long writeTime) {
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, writeTime);
    }

    public final boolean casWriteTime(long expect, long update) {
      return UnsafeAccess.UNSAFE.compareAndSwapLong(this, WRITE_TIME_OFFSET, expect, update);
    }
  }

  static final class SStARMS extends SStAR {
    private int queueType;

    SStARMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SStARMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }
  }

  static final class SStARMW extends SStAR {
    private int queueType;

    private int weight;

    private int policyWeight;

    SStARMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    SStARMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }
  }

  static class SStAW extends SStA {
    protected static final long WRITE_TIME_OFFSET = UnsafeAccess.objectFieldOffset(SStAW.class, "writeTime");

    private volatile long writeTime;

    private Node previousInWriteOrder;

    private Node nextInWriteOrder;

    SStAW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    SStAW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    public final long getWriteTime() {
      return UnsafeAccess.UNSAFE.getLong(this, WRITE_TIME_OFFSET);
    }

    public final void setWriteTime(long writeTime) {
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, writeTime);
    }

    public final Node getPreviousInWriteOrder() {
      return previousInWriteOrder;
    }

    public final void setPreviousInWriteOrder(Node previousInWriteOrder) {
      this.previousInWriteOrder = previousInWriteOrder;
    }

    public final Node getNextInWriteOrder() {
      return nextInWriteOrder;
    }

    public final void setNextInWriteOrder(Node nextInWriteOrder) {
      this.nextInWriteOrder = nextInWriteOrder;
    }
  }

  static final class SStAWMS extends SStAW {
    private int queueType;

    SStAWMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SStAWMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }
  }

  static final class SStAWMW extends SStAW {
    private int queueType;

    private int weight;

    private int policyWeight;

    SStAWMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    SStAWMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }
  }

  static class SStAWR extends SStAW {
    SStAWR(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SStAWR(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final boolean casWriteTime(long expect, long update) {
      return UnsafeAccess.UNSAFE.compareAndSwapLong(this, WRITE_TIME_OFFSET, expect, update);
    }
  }

  static final class SStAWRMS extends SStAWR {
    private int queueType;

    SStAWRMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SStAWRMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }
  }

  static final class SStAWRMW extends SStAWR {
    private int queueType;

    private int weight;

    private int policyWeight;

    SStAWRMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    SStAWRMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }
  }

  static final class SStMS extends SSt {
    private int queueType;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    SStMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SStMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class SStMW extends SSt {
    private int queueType;

    private int weight;

    private int policyWeight;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    SStMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    SStMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static class SStR extends SSt {
    protected static final long WRITE_TIME_OFFSET = UnsafeAccess.objectFieldOffset(SStR.class, "writeTime");

    private volatile long writeTime;

    SStR(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    SStR(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    public final long getWriteTime() {
      return UnsafeAccess.UNSAFE.getLong(this, WRITE_TIME_OFFSET);
    }

    public final void setWriteTime(long writeTime) {
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, writeTime);
    }

    public final boolean casWriteTime(long expect, long update) {
      return UnsafeAccess.UNSAFE.compareAndSwapLong(this, WRITE_TIME_OFFSET, expect, update);
    }
  }

  static final class SStRMS extends SStR {
    private int queueType;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    SStRMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SStRMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class SStRMW extends SStR {
    private int queueType;

    private int weight;

    private int policyWeight;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    SStRMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    SStRMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static class SStW extends SSt {
    protected static final long WRITE_TIME_OFFSET = UnsafeAccess.objectFieldOffset(SStW.class, "writeTime");

    private volatile long writeTime;

    private Node previousInWriteOrder;

    private Node nextInWriteOrder;

    SStW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    SStW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    public final long getWriteTime() {
      return UnsafeAccess.UNSAFE.getLong(this, WRITE_TIME_OFFSET);
    }

    public final void setWriteTime(long writeTime) {
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, writeTime);
    }

    public final Node getPreviousInWriteOrder() {
      return previousInWriteOrder;
    }

    public final void setPreviousInWriteOrder(Node previousInWriteOrder) {
      this.previousInWriteOrder = previousInWriteOrder;
    }

    public final Node getNextInWriteOrder() {
      return nextInWriteOrder;
    }

    public final void setNextInWriteOrder(Node nextInWriteOrder) {
      this.nextInWriteOrder = nextInWriteOrder;
    }
  }

  static final class SStWMS extends SStW {
    private int queueType;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    SStWMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SStWMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class SStWMW extends SStW {
    private int queueType;

    private int weight;

    private int policyWeight;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    SStWMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    SStWMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static class SStWR extends SStW {
    SStWR(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SStWR(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final boolean casWriteTime(long expect, long update) {
      return UnsafeAccess.UNSAFE.compareAndSwapLong(this, WRITE_TIME_OFFSET, expect, update);
    }
  }

  static final class SStWRMS extends SStWR {
    private int queueType;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    SStWRMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SStWRMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class SStWRMW extends SStWR {
    private int queueType;

    private int weight;

    private int policyWeight;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    SStWRMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    SStWRMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static class SW implements Node {
    protected static final long KEY_OFFSET = UnsafeAccess.objectFieldOffset(SW.class, "key");

    protected static final long VALUE_OFFSET = UnsafeAccess.objectFieldOffset(SW.class, "value");

    private volatile K key;

    private volatile WeakValueReference value;

    SW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      UnsafeAccess.UNSAFE.putObject(this, KEY_OFFSET, key);
      UnsafeAccess.UNSAFE.putObject(this, VALUE_OFFSET, new WeakValueReference(key, value, valueReferenceQueue));
    }

    SW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      UnsafeAccess.UNSAFE.putObject(this, KEY_OFFSET, (K) keyReference);
      UnsafeAccess.UNSAFE.putObject(this, VALUE_OFFSET, new WeakValueReference(keyReference, value, valueReferenceQueue));
    }

    public final K getKey() {
      return (K) UnsafeAccess.UNSAFE.getObject(this, KEY_OFFSET);
    }

    public final Object getKeyReference() {
      return UnsafeAccess.UNSAFE.getObject(this, KEY_OFFSET);
    }

    public final V getValue() {
      return ((Reference) UnsafeAccess.UNSAFE.getObject(this, VALUE_OFFSET)).get();
    }

    public final Object getValueReference() {
      return UnsafeAccess.UNSAFE.getObject(this, VALUE_OFFSET);
    }

    public final void setValue(V value, ReferenceQueue referenceQueue) {
      ((Reference) getValueReference()).clear();
      UnsafeAccess.UNSAFE.putObject(this, VALUE_OFFSET, new WeakValueReference(key, value, referenceQueue));
    }

    public final boolean containsValue(Object value) {
      return getValue() == value;
    }

    public final boolean isAlive() {
      Object key = getKeyReference();
      return (key != RETIRED_STRONG_KEY) && (key != DEAD_STRONG_KEY);
    }

    public final boolean isRetired() {
      return (getKeyReference() == RETIRED_STRONG_KEY);
    }

    public final void retire() {
      ((Reference) getValueReference()).clear();
      UnsafeAccess.UNSAFE.putObject(this, KEY_OFFSET, RETIRED_STRONG_KEY);
    }

    public final boolean isDead() {
      return (getKeyReference() == DEAD_STRONG_KEY);
    }

    public final void die() {
      ((Reference) getValueReference()).clear();
      UnsafeAccess.UNSAFE.putObject(this, KEY_OFFSET, DEAD_STRONG_KEY);
    }

    public final String toString() {
      return String.format("%s=[key=%s, value=%s, weight=%d, queueType=%,d, accessTimeNS=%,d, "
          + "writeTimeNS=%,d, prevInAccess=%s, nextInAccess=%s, prevInWrite=%s, nextInWrite=%s]",
          getClass().getSimpleName(), getKey(), getValue(), getWeight(), getQueueType(), 
          getAccessTime(), getWriteTime(), getPreviousInAccessOrder() != null,
          getNextInAccessOrder() != null, getPreviousInWriteOrder() != null,
          getNextInWriteOrder() != null);
    }
  }

  static class SWA extends SW {
    protected static final long ACCESS_TIME_OFFSET = UnsafeAccess.objectFieldOffset(SWA.class, "accessTime");

    private volatile long accessTime;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    SWA(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, ACCESS_TIME_OFFSET, now);
    }

    SWA(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, ACCESS_TIME_OFFSET, now);
    }

    public final long getAccessTime() {
      return UnsafeAccess.UNSAFE.getLong(this, ACCESS_TIME_OFFSET);
    }

    public final void setAccessTime(long accessTime) {
      UnsafeAccess.UNSAFE.putLong(this, ACCESS_TIME_OFFSET, accessTime);
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class SWAMS extends SWA {
    private int queueType;

    SWAMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SWAMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }
  }

  static final class SWAMW extends SWA {
    private int queueType;

    private int weight;

    private int policyWeight;

    SWAMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    SWAMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }
  }

  static class SWAR extends SWA {
    protected static final long WRITE_TIME_OFFSET = UnsafeAccess.objectFieldOffset(SWAR.class, "writeTime");

    private volatile long writeTime;

    SWAR(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    SWAR(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    public final long getWriteTime() {
      return UnsafeAccess.UNSAFE.getLong(this, WRITE_TIME_OFFSET);
    }

    public final void setWriteTime(long writeTime) {
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, writeTime);
    }

    public final boolean casWriteTime(long expect, long update) {
      return UnsafeAccess.UNSAFE.compareAndSwapLong(this, WRITE_TIME_OFFSET, expect, update);
    }
  }

  static final class SWARMS extends SWAR {
    private int queueType;

    SWARMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SWARMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }
  }

  static final class SWARMW extends SWAR {
    private int queueType;

    private int weight;

    private int policyWeight;

    SWARMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    SWARMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }
  }

  static class SWAW extends SWA {
    protected static final long WRITE_TIME_OFFSET = UnsafeAccess.objectFieldOffset(SWAW.class, "writeTime");

    private volatile long writeTime;

    private Node previousInWriteOrder;

    private Node nextInWriteOrder;

    SWAW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    SWAW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    public final long getWriteTime() {
      return UnsafeAccess.UNSAFE.getLong(this, WRITE_TIME_OFFSET);
    }

    public final void setWriteTime(long writeTime) {
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, writeTime);
    }

    public final Node getPreviousInWriteOrder() {
      return previousInWriteOrder;
    }

    public final void setPreviousInWriteOrder(Node previousInWriteOrder) {
      this.previousInWriteOrder = previousInWriteOrder;
    }

    public final Node getNextInWriteOrder() {
      return nextInWriteOrder;
    }

    public final void setNextInWriteOrder(Node nextInWriteOrder) {
      this.nextInWriteOrder = nextInWriteOrder;
    }
  }

  static final class SWAWMS extends SWAW {
    private int queueType;

    SWAWMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SWAWMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }
  }

  static final class SWAWMW extends SWAW {
    private int queueType;

    private int weight;

    private int policyWeight;

    SWAWMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    SWAWMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }
  }

  static class SWAWR extends SWAW {
    SWAWR(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SWAWR(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final boolean casWriteTime(long expect, long update) {
      return UnsafeAccess.UNSAFE.compareAndSwapLong(this, WRITE_TIME_OFFSET, expect, update);
    }
  }

  static final class SWAWRMS extends SWAWR {
    private int queueType;

    SWAWRMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SWAWRMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }
  }

  static final class SWAWRMW extends SWAWR {
    private int queueType;

    private int weight;

    private int policyWeight;

    SWAWRMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    SWAWRMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }
  }

  static final class SWMS extends SW {
    private int queueType;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    SWMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SWMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class SWMW extends SW {
    private int queueType;

    private int weight;

    private int policyWeight;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    SWMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    SWMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static class SWR extends SW {
    protected static final long WRITE_TIME_OFFSET = UnsafeAccess.objectFieldOffset(SWR.class, "writeTime");

    private volatile long writeTime;

    SWR(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    SWR(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    public final long getWriteTime() {
      return UnsafeAccess.UNSAFE.getLong(this, WRITE_TIME_OFFSET);
    }

    public final void setWriteTime(long writeTime) {
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, writeTime);
    }

    public final boolean casWriteTime(long expect, long update) {
      return UnsafeAccess.UNSAFE.compareAndSwapLong(this, WRITE_TIME_OFFSET, expect, update);
    }
  }

  static final class SWRMS extends SWR {
    private int queueType;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    SWRMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SWRMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class SWRMW extends SWR {
    private int queueType;

    private int weight;

    private int policyWeight;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    SWRMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    SWRMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static class SWW extends SW {
    protected static final long WRITE_TIME_OFFSET = UnsafeAccess.objectFieldOffset(SWW.class, "writeTime");

    private volatile long writeTime;

    private Node previousInWriteOrder;

    private Node nextInWriteOrder;

    SWW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    SWW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    public final long getWriteTime() {
      return UnsafeAccess.UNSAFE.getLong(this, WRITE_TIME_OFFSET);
    }

    public final void setWriteTime(long writeTime) {
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, writeTime);
    }

    public final Node getPreviousInWriteOrder() {
      return previousInWriteOrder;
    }

    public final void setPreviousInWriteOrder(Node previousInWriteOrder) {
      this.previousInWriteOrder = previousInWriteOrder;
    }

    public final Node getNextInWriteOrder() {
      return nextInWriteOrder;
    }

    public final void setNextInWriteOrder(Node nextInWriteOrder) {
      this.nextInWriteOrder = nextInWriteOrder;
    }
  }

  static final class SWWMS extends SWW {
    private int queueType;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    SWWMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SWWMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class SWWMW extends SWW {
    private int queueType;

    private int weight;

    private int policyWeight;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    SWWMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    SWWMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static class SWWR extends SWW {
    SWWR(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SWWR(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final boolean casWriteTime(long expect, long update) {
      return UnsafeAccess.UNSAFE.compareAndSwapLong(this, WRITE_TIME_OFFSET, expect, update);
    }
  }

  static final class SWWRMS extends SWWR {
    private int queueType;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    SWWRMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    SWWRMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class SWWRMW extends SWWR {
    private int queueType;

    private int weight;

    private int policyWeight;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    SWWRMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    SWWRMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static class WSo implements Node {
    protected static final long KEY_OFFSET = UnsafeAccess.objectFieldOffset(WSo.class, "key");

    protected static final long VALUE_OFFSET = UnsafeAccess.objectFieldOffset(WSo.class, "value");

    private volatile WeakKeyReference key;

    private volatile SoftValueReference value;

    WSo(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      UnsafeAccess.UNSAFE.putObject(this, KEY_OFFSET, new WeakKeyReference(key, keyReferenceQueue));
      UnsafeAccess.UNSAFE.putObject(this, VALUE_OFFSET, new SoftValueReference(key, value, valueReferenceQueue));
    }

    WSo(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      UnsafeAccess.UNSAFE.putObject(this, KEY_OFFSET, (WeakKeyReference) keyReference);
      UnsafeAccess.UNSAFE.putObject(this, VALUE_OFFSET, new SoftValueReference(keyReference, value, valueReferenceQueue));
    }

    public final K getKey() {
      return ((Reference) UnsafeAccess.UNSAFE.getObject(this, KEY_OFFSET)).get();
    }

    public final Object getKeyReference() {
      return UnsafeAccess.UNSAFE.getObject(this, KEY_OFFSET);
    }

    public final V getValue() {
      return ((Reference) UnsafeAccess.UNSAFE.getObject(this, VALUE_OFFSET)).get();
    }

    public final Object getValueReference() {
      return UnsafeAccess.UNSAFE.getObject(this, VALUE_OFFSET);
    }

    public final void setValue(V value, ReferenceQueue referenceQueue) {
      ((Reference) getValueReference()).clear();
      UnsafeAccess.UNSAFE.putObject(this, VALUE_OFFSET, new SoftValueReference(key, value, referenceQueue));
    }

    public final boolean containsValue(Object value) {
      return getValue() == value;
    }

    public final boolean isAlive() {
      Object key = getKeyReference();
      return (key != RETIRED_WEAK_KEY) && (key != DEAD_WEAK_KEY);
    }

    public final boolean isRetired() {
      return (getKeyReference() == RETIRED_WEAK_KEY);
    }

    public final void retire() {
      ((Reference) getKeyReference()).clear();
      ((Reference) getValueReference()).clear();
      UnsafeAccess.UNSAFE.putObject(this, KEY_OFFSET, RETIRED_WEAK_KEY);
    }

    public final boolean isDead() {
      return (getKeyReference() == DEAD_WEAK_KEY);
    }

    public final void die() {
      ((Reference) getKeyReference()).clear();
      ((Reference) getValueReference()).clear();
      UnsafeAccess.UNSAFE.putObject(this, KEY_OFFSET, DEAD_WEAK_KEY);
    }

    public final String toString() {
      return String.format("%s=[key=%s, value=%s, weight=%d, queueType=%,d, accessTimeNS=%,d, "
          + "writeTimeNS=%,d, prevInAccess=%s, nextInAccess=%s, prevInWrite=%s, nextInWrite=%s]",
          getClass().getSimpleName(), getKey(), getValue(), getWeight(), getQueueType(), 
          getAccessTime(), getWriteTime(), getPreviousInAccessOrder() != null,
          getNextInAccessOrder() != null, getPreviousInWriteOrder() != null,
          getNextInWriteOrder() != null);
    }
  }

  static class WSoA extends WSo {
    protected static final long ACCESS_TIME_OFFSET = UnsafeAccess.objectFieldOffset(WSoA.class, "accessTime");

    private volatile long accessTime;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    WSoA(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, ACCESS_TIME_OFFSET, now);
    }

    WSoA(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, ACCESS_TIME_OFFSET, now);
    }

    public final long getAccessTime() {
      return UnsafeAccess.UNSAFE.getLong(this, ACCESS_TIME_OFFSET);
    }

    public final void setAccessTime(long accessTime) {
      UnsafeAccess.UNSAFE.putLong(this, ACCESS_TIME_OFFSET, accessTime);
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class WSoAMS extends WSoA {
    private int queueType;

    WSoAMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WSoAMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }
  }

  static final class WSoAMW extends WSoA {
    private int queueType;

    private int weight;

    private int policyWeight;

    WSoAMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    WSoAMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }
  }

  static class WSoAR extends WSoA {
    protected static final long WRITE_TIME_OFFSET = UnsafeAccess.objectFieldOffset(WSoAR.class, "writeTime");

    private volatile long writeTime;

    WSoAR(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    WSoAR(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    public final long getWriteTime() {
      return UnsafeAccess.UNSAFE.getLong(this, WRITE_TIME_OFFSET);
    }

    public final void setWriteTime(long writeTime) {
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, writeTime);
    }

    public final boolean casWriteTime(long expect, long update) {
      return UnsafeAccess.UNSAFE.compareAndSwapLong(this, WRITE_TIME_OFFSET, expect, update);
    }
  }

  static final class WSoARMS extends WSoAR {
    private int queueType;

    WSoARMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WSoARMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }
  }

  static final class WSoARMW extends WSoAR {
    private int queueType;

    private int weight;

    private int policyWeight;

    WSoARMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    WSoARMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }
  }

  static class WSoAW extends WSoA {
    protected static final long WRITE_TIME_OFFSET = UnsafeAccess.objectFieldOffset(WSoAW.class, "writeTime");

    private volatile long writeTime;

    private Node previousInWriteOrder;

    private Node nextInWriteOrder;

    WSoAW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    WSoAW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    public final long getWriteTime() {
      return UnsafeAccess.UNSAFE.getLong(this, WRITE_TIME_OFFSET);
    }

    public final void setWriteTime(long writeTime) {
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, writeTime);
    }

    public final Node getPreviousInWriteOrder() {
      return previousInWriteOrder;
    }

    public final void setPreviousInWriteOrder(Node previousInWriteOrder) {
      this.previousInWriteOrder = previousInWriteOrder;
    }

    public final Node getNextInWriteOrder() {
      return nextInWriteOrder;
    }

    public final void setNextInWriteOrder(Node nextInWriteOrder) {
      this.nextInWriteOrder = nextInWriteOrder;
    }
  }

  static final class WSoAWMS extends WSoAW {
    private int queueType;

    WSoAWMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WSoAWMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }
  }

  static final class WSoAWMW extends WSoAW {
    private int queueType;

    private int weight;

    private int policyWeight;

    WSoAWMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    WSoAWMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }
  }

  static class WSoAWR extends WSoAW {
    WSoAWR(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WSoAWR(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final boolean casWriteTime(long expect, long update) {
      return UnsafeAccess.UNSAFE.compareAndSwapLong(this, WRITE_TIME_OFFSET, expect, update);
    }
  }

  static final class WSoAWRMS extends WSoAWR {
    private int queueType;

    WSoAWRMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WSoAWRMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }
  }

  static final class WSoAWRMW extends WSoAWR {
    private int queueType;

    private int weight;

    private int policyWeight;

    WSoAWRMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    WSoAWRMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }
  }

  static final class WSoMS extends WSo {
    private int queueType;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    WSoMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WSoMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class WSoMW extends WSo {
    private int queueType;

    private int weight;

    private int policyWeight;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    WSoMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    WSoMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static class WSoR extends WSo {
    protected static final long WRITE_TIME_OFFSET = UnsafeAccess.objectFieldOffset(WSoR.class, "writeTime");

    private volatile long writeTime;

    WSoR(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    WSoR(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    public final long getWriteTime() {
      return UnsafeAccess.UNSAFE.getLong(this, WRITE_TIME_OFFSET);
    }

    public final void setWriteTime(long writeTime) {
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, writeTime);
    }

    public final boolean casWriteTime(long expect, long update) {
      return UnsafeAccess.UNSAFE.compareAndSwapLong(this, WRITE_TIME_OFFSET, expect, update);
    }
  }

  static final class WSoRMS extends WSoR {
    private int queueType;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    WSoRMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WSoRMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class WSoRMW extends WSoR {
    private int queueType;

    private int weight;

    private int policyWeight;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    WSoRMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    WSoRMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static class WSoW extends WSo {
    protected static final long WRITE_TIME_OFFSET = UnsafeAccess.objectFieldOffset(WSoW.class, "writeTime");

    private volatile long writeTime;

    private Node previousInWriteOrder;

    private Node nextInWriteOrder;

    WSoW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    WSoW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    public final long getWriteTime() {
      return UnsafeAccess.UNSAFE.getLong(this, WRITE_TIME_OFFSET);
    }

    public final void setWriteTime(long writeTime) {
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, writeTime);
    }

    public final Node getPreviousInWriteOrder() {
      return previousInWriteOrder;
    }

    public final void setPreviousInWriteOrder(Node previousInWriteOrder) {
      this.previousInWriteOrder = previousInWriteOrder;
    }

    public final Node getNextInWriteOrder() {
      return nextInWriteOrder;
    }

    public final void setNextInWriteOrder(Node nextInWriteOrder) {
      this.nextInWriteOrder = nextInWriteOrder;
    }
  }

  static final class WSoWMS extends WSoW {
    private int queueType;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    WSoWMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WSoWMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class WSoWMW extends WSoW {
    private int queueType;

    private int weight;

    private int policyWeight;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    WSoWMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    WSoWMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static class WSoWR extends WSoW {
    WSoWR(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WSoWR(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final boolean casWriteTime(long expect, long update) {
      return UnsafeAccess.UNSAFE.compareAndSwapLong(this, WRITE_TIME_OFFSET, expect, update);
    }
  }

  static final class WSoWRMS extends WSoWR {
    private int queueType;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    WSoWRMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WSoWRMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class WSoWRMW extends WSoWR {
    private int queueType;

    private int weight;

    private int policyWeight;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    WSoWRMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    WSoWRMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static class WSt implements Node {
    protected static final long KEY_OFFSET = UnsafeAccess.objectFieldOffset(WSt.class, "key");

    protected static final long VALUE_OFFSET = UnsafeAccess.objectFieldOffset(WSt.class, "value");

    private volatile WeakKeyReference key;

    private volatile V value;

    WSt(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      UnsafeAccess.UNSAFE.putObject(this, KEY_OFFSET, new WeakKeyReference(key, keyReferenceQueue));
      UnsafeAccess.UNSAFE.putObject(this, VALUE_OFFSET, value);
    }

    WSt(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      UnsafeAccess.UNSAFE.putObject(this, KEY_OFFSET, (WeakKeyReference) keyReference);
      UnsafeAccess.UNSAFE.putObject(this, VALUE_OFFSET, value);
    }

    public final K getKey() {
      return ((Reference) UnsafeAccess.UNSAFE.getObject(this, KEY_OFFSET)).get();
    }

    public final Object getKeyReference() {
      return UnsafeAccess.UNSAFE.getObject(this, KEY_OFFSET);
    }

    public final V getValue() {
      return (V) UnsafeAccess.UNSAFE.getObject(this, VALUE_OFFSET);
    }

    public final Object getValueReference() {
      return UnsafeAccess.UNSAFE.getObject(this, VALUE_OFFSET);
    }

    public final void setValue(V value, ReferenceQueue referenceQueue) {
      UnsafeAccess.UNSAFE.putObject(this, VALUE_OFFSET, value);
    }

    public final boolean containsValue(Object value) {
      return Objects.equals(value, getValue());
    }

    public final boolean isAlive() {
      Object key = getKeyReference();
      return (key != RETIRED_WEAK_KEY) && (key != DEAD_WEAK_KEY);
    }

    public final boolean isRetired() {
      return (getKeyReference() == RETIRED_WEAK_KEY);
    }

    public final void retire() {
      ((Reference) getKeyReference()).clear();
      UnsafeAccess.UNSAFE.putObject(this, KEY_OFFSET, RETIRED_WEAK_KEY);
    }

    public final boolean isDead() {
      return (getKeyReference() == DEAD_WEAK_KEY);
    }

    public final void die() {
      ((Reference) getKeyReference()).clear();
      UnsafeAccess.UNSAFE.putObject(this, VALUE_OFFSET, null);
      UnsafeAccess.UNSAFE.putObject(this, KEY_OFFSET, DEAD_WEAK_KEY);
    }

    public final String toString() {
      return String.format("%s=[key=%s, value=%s, weight=%d, queueType=%,d, accessTimeNS=%,d, "
          + "writeTimeNS=%,d, prevInAccess=%s, nextInAccess=%s, prevInWrite=%s, nextInWrite=%s]",
          getClass().getSimpleName(), getKey(), getValue(), getWeight(), getQueueType(), 
          getAccessTime(), getWriteTime(), getPreviousInAccessOrder() != null,
          getNextInAccessOrder() != null, getPreviousInWriteOrder() != null,
          getNextInWriteOrder() != null);
    }
  }

  static class WStA extends WSt {
    protected static final long ACCESS_TIME_OFFSET = UnsafeAccess.objectFieldOffset(WStA.class, "accessTime");

    private volatile long accessTime;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    WStA(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, ACCESS_TIME_OFFSET, now);
    }

    WStA(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, ACCESS_TIME_OFFSET, now);
    }

    public final long getAccessTime() {
      return UnsafeAccess.UNSAFE.getLong(this, ACCESS_TIME_OFFSET);
    }

    public final void setAccessTime(long accessTime) {
      UnsafeAccess.UNSAFE.putLong(this, ACCESS_TIME_OFFSET, accessTime);
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class WStAMS extends WStA {
    private int queueType;

    WStAMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WStAMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }
  }

  static final class WStAMW extends WStA {
    private int queueType;

    private int weight;

    private int policyWeight;

    WStAMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    WStAMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }
  }

  static class WStAR extends WStA {
    protected static final long WRITE_TIME_OFFSET = UnsafeAccess.objectFieldOffset(WStAR.class, "writeTime");

    private volatile long writeTime;

    WStAR(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    WStAR(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    public final long getWriteTime() {
      return UnsafeAccess.UNSAFE.getLong(this, WRITE_TIME_OFFSET);
    }

    public final void setWriteTime(long writeTime) {
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, writeTime);
    }

    public final boolean casWriteTime(long expect, long update) {
      return UnsafeAccess.UNSAFE.compareAndSwapLong(this, WRITE_TIME_OFFSET, expect, update);
    }
  }

  static final class WStARMS extends WStAR {
    private int queueType;

    WStARMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WStARMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }
  }

  static final class WStARMW extends WStAR {
    private int queueType;

    private int weight;

    private int policyWeight;

    WStARMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    WStARMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }
  }

  static class WStAW extends WStA {
    protected static final long WRITE_TIME_OFFSET = UnsafeAccess.objectFieldOffset(WStAW.class, "writeTime");

    private volatile long writeTime;

    private Node previousInWriteOrder;

    private Node nextInWriteOrder;

    WStAW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    WStAW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    public final long getWriteTime() {
      return UnsafeAccess.UNSAFE.getLong(this, WRITE_TIME_OFFSET);
    }

    public final void setWriteTime(long writeTime) {
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, writeTime);
    }

    public final Node getPreviousInWriteOrder() {
      return previousInWriteOrder;
    }

    public final void setPreviousInWriteOrder(Node previousInWriteOrder) {
      this.previousInWriteOrder = previousInWriteOrder;
    }

    public final Node getNextInWriteOrder() {
      return nextInWriteOrder;
    }

    public final void setNextInWriteOrder(Node nextInWriteOrder) {
      this.nextInWriteOrder = nextInWriteOrder;
    }
  }

  static final class WStAWMS extends WStAW {
    private int queueType;

    WStAWMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WStAWMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }
  }

  static final class WStAWMW extends WStAW {
    private int queueType;

    private int weight;

    private int policyWeight;

    WStAWMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    WStAWMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }
  }

  static class WStAWR extends WStAW {
    WStAWR(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WStAWR(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final boolean casWriteTime(long expect, long update) {
      return UnsafeAccess.UNSAFE.compareAndSwapLong(this, WRITE_TIME_OFFSET, expect, update);
    }
  }

  static final class WStAWRMS extends WStAWR {
    private int queueType;

    WStAWRMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WStAWRMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }
  }

  static final class WStAWRMW extends WStAWR {
    private int queueType;

    private int weight;

    private int policyWeight;

    WStAWRMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    WStAWRMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }
  }

  static final class WStMS extends WSt {
    private int queueType;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    WStMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WStMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class WStMW extends WSt {
    private int queueType;

    private int weight;

    private int policyWeight;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    WStMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    WStMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static class WStR extends WSt {
    protected static final long WRITE_TIME_OFFSET = UnsafeAccess.objectFieldOffset(WStR.class, "writeTime");

    private volatile long writeTime;

    WStR(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    WStR(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    public final long getWriteTime() {
      return UnsafeAccess.UNSAFE.getLong(this, WRITE_TIME_OFFSET);
    }

    public final void setWriteTime(long writeTime) {
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, writeTime);
    }

    public final boolean casWriteTime(long expect, long update) {
      return UnsafeAccess.UNSAFE.compareAndSwapLong(this, WRITE_TIME_OFFSET, expect, update);
    }
  }

  static final class WStRMS extends WStR {
    private int queueType;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    WStRMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WStRMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class WStRMW extends WStR {
    private int queueType;

    private int weight;

    private int policyWeight;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    WStRMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    WStRMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static class WStW extends WSt {
    protected static final long WRITE_TIME_OFFSET = UnsafeAccess.objectFieldOffset(WStW.class, "writeTime");

    private volatile long writeTime;

    private Node previousInWriteOrder;

    private Node nextInWriteOrder;

    WStW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    WStW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    public final long getWriteTime() {
      return UnsafeAccess.UNSAFE.getLong(this, WRITE_TIME_OFFSET);
    }

    public final void setWriteTime(long writeTime) {
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, writeTime);
    }

    public final Node getPreviousInWriteOrder() {
      return previousInWriteOrder;
    }

    public final void setPreviousInWriteOrder(Node previousInWriteOrder) {
      this.previousInWriteOrder = previousInWriteOrder;
    }

    public final Node getNextInWriteOrder() {
      return nextInWriteOrder;
    }

    public final void setNextInWriteOrder(Node nextInWriteOrder) {
      this.nextInWriteOrder = nextInWriteOrder;
    }
  }

  static final class WStWMS extends WStW {
    private int queueType;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    WStWMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WStWMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class WStWMW extends WStW {
    private int queueType;

    private int weight;

    private int policyWeight;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    WStWMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    WStWMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static class WStWR extends WStW {
    WStWR(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WStWR(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final boolean casWriteTime(long expect, long update) {
      return UnsafeAccess.UNSAFE.compareAndSwapLong(this, WRITE_TIME_OFFSET, expect, update);
    }
  }

  static final class WStWRMS extends WStWR {
    private int queueType;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    WStWRMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WStWRMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class WStWRMW extends WStWR {
    private int queueType;

    private int weight;

    private int policyWeight;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    WStWRMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    WStWRMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static class WW implements Node {
    protected static final long KEY_OFFSET = UnsafeAccess.objectFieldOffset(WW.class, "key");

    protected static final long VALUE_OFFSET = UnsafeAccess.objectFieldOffset(WW.class, "value");

    private volatile WeakKeyReference key;

    private volatile WeakValueReference value;

    WW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      UnsafeAccess.UNSAFE.putObject(this, KEY_OFFSET, new WeakKeyReference(key, keyReferenceQueue));
      UnsafeAccess.UNSAFE.putObject(this, VALUE_OFFSET, new WeakValueReference(key, value, valueReferenceQueue));
    }

    WW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      UnsafeAccess.UNSAFE.putObject(this, KEY_OFFSET, (WeakKeyReference) keyReference);
      UnsafeAccess.UNSAFE.putObject(this, VALUE_OFFSET, new WeakValueReference(keyReference, value, valueReferenceQueue));
    }

    public final K getKey() {
      return ((Reference) UnsafeAccess.UNSAFE.getObject(this, KEY_OFFSET)).get();
    }

    public final Object getKeyReference() {
      return UnsafeAccess.UNSAFE.getObject(this, KEY_OFFSET);
    }

    public final V getValue() {
      return ((Reference) UnsafeAccess.UNSAFE.getObject(this, VALUE_OFFSET)).get();
    }

    public final Object getValueReference() {
      return UnsafeAccess.UNSAFE.getObject(this, VALUE_OFFSET);
    }

    public final void setValue(V value, ReferenceQueue referenceQueue) {
      ((Reference) getValueReference()).clear();
      UnsafeAccess.UNSAFE.putObject(this, VALUE_OFFSET, new WeakValueReference(key, value, referenceQueue));
    }

    public final boolean containsValue(Object value) {
      return getValue() == value;
    }

    public final boolean isAlive() {
      Object key = getKeyReference();
      return (key != RETIRED_WEAK_KEY) && (key != DEAD_WEAK_KEY);
    }

    public final boolean isRetired() {
      return (getKeyReference() == RETIRED_WEAK_KEY);
    }

    public final void retire() {
      ((Reference) getKeyReference()).clear();
      ((Reference) getValueReference()).clear();
      UnsafeAccess.UNSAFE.putObject(this, KEY_OFFSET, RETIRED_WEAK_KEY);
    }

    public final boolean isDead() {
      return (getKeyReference() == DEAD_WEAK_KEY);
    }

    public final void die() {
      ((Reference) getKeyReference()).clear();
      ((Reference) getValueReference()).clear();
      UnsafeAccess.UNSAFE.putObject(this, KEY_OFFSET, DEAD_WEAK_KEY);
    }

    public final String toString() {
      return String.format("%s=[key=%s, value=%s, weight=%d, queueType=%,d, accessTimeNS=%,d, "
          + "writeTimeNS=%,d, prevInAccess=%s, nextInAccess=%s, prevInWrite=%s, nextInWrite=%s]",
          getClass().getSimpleName(), getKey(), getValue(), getWeight(), getQueueType(), 
          getAccessTime(), getWriteTime(), getPreviousInAccessOrder() != null,
          getNextInAccessOrder() != null, getPreviousInWriteOrder() != null,
          getNextInWriteOrder() != null);
    }
  }

  static class WWA extends WW {
    protected static final long ACCESS_TIME_OFFSET = UnsafeAccess.objectFieldOffset(WWA.class, "accessTime");

    private volatile long accessTime;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    WWA(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, ACCESS_TIME_OFFSET, now);
    }

    WWA(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, ACCESS_TIME_OFFSET, now);
    }

    public final long getAccessTime() {
      return UnsafeAccess.UNSAFE.getLong(this, ACCESS_TIME_OFFSET);
    }

    public final void setAccessTime(long accessTime) {
      UnsafeAccess.UNSAFE.putLong(this, ACCESS_TIME_OFFSET, accessTime);
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class WWAMS extends WWA {
    private int queueType;

    WWAMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WWAMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }
  }

  static final class WWAMW extends WWA {
    private int queueType;

    private int weight;

    private int policyWeight;

    WWAMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    WWAMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }
  }

  static class WWAR extends WWA {
    protected static final long WRITE_TIME_OFFSET = UnsafeAccess.objectFieldOffset(WWAR.class, "writeTime");

    private volatile long writeTime;

    WWAR(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    WWAR(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    public final long getWriteTime() {
      return UnsafeAccess.UNSAFE.getLong(this, WRITE_TIME_OFFSET);
    }

    public final void setWriteTime(long writeTime) {
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, writeTime);
    }

    public final boolean casWriteTime(long expect, long update) {
      return UnsafeAccess.UNSAFE.compareAndSwapLong(this, WRITE_TIME_OFFSET, expect, update);
    }
  }

  static final class WWARMS extends WWAR {
    private int queueType;

    WWARMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WWARMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }
  }

  static final class WWARMW extends WWAR {
    private int queueType;

    private int weight;

    private int policyWeight;

    WWARMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    WWARMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }
  }

  static class WWAW extends WWA {
    protected static final long WRITE_TIME_OFFSET = UnsafeAccess.objectFieldOffset(WWAW.class, "writeTime");

    private volatile long writeTime;

    private Node previousInWriteOrder;

    private Node nextInWriteOrder;

    WWAW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    WWAW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    public final long getWriteTime() {
      return UnsafeAccess.UNSAFE.getLong(this, WRITE_TIME_OFFSET);
    }

    public final void setWriteTime(long writeTime) {
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, writeTime);
    }

    public final Node getPreviousInWriteOrder() {
      return previousInWriteOrder;
    }

    public final void setPreviousInWriteOrder(Node previousInWriteOrder) {
      this.previousInWriteOrder = previousInWriteOrder;
    }

    public final Node getNextInWriteOrder() {
      return nextInWriteOrder;
    }

    public final void setNextInWriteOrder(Node nextInWriteOrder) {
      this.nextInWriteOrder = nextInWriteOrder;
    }
  }

  static final class WWAWMS extends WWAW {
    private int queueType;

    WWAWMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WWAWMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }
  }

  static final class WWAWMW extends WWAW {
    private int queueType;

    private int weight;

    private int policyWeight;

    WWAWMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    WWAWMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }
  }

  static class WWAWR extends WWAW {
    WWAWR(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WWAWR(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final boolean casWriteTime(long expect, long update) {
      return UnsafeAccess.UNSAFE.compareAndSwapLong(this, WRITE_TIME_OFFSET, expect, update);
    }
  }

  static final class WWAWRMS extends WWAWR {
    private int queueType;

    WWAWRMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WWAWRMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }
  }

  static final class WWAWRMW extends WWAWR {
    private int queueType;

    private int weight;

    private int policyWeight;

    WWAWRMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    WWAWRMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }
  }

  static final class WWMS extends WW {
    private int queueType;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    WWMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WWMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class WWMW extends WW {
    private int queueType;

    private int weight;

    private int policyWeight;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    WWMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    WWMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static class WWR extends WW {
    protected static final long WRITE_TIME_OFFSET = UnsafeAccess.objectFieldOffset(WWR.class, "writeTime");

    private volatile long writeTime;

    WWR(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    WWR(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    public final long getWriteTime() {
      return UnsafeAccess.UNSAFE.getLong(this, WRITE_TIME_OFFSET);
    }

    public final void setWriteTime(long writeTime) {
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, writeTime);
    }

    public final boolean casWriteTime(long expect, long update) {
      return UnsafeAccess.UNSAFE.compareAndSwapLong(this, WRITE_TIME_OFFSET, expect, update);
    }
  }

  static final class WWRMS extends WWR {
    private int queueType;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    WWRMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WWRMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class WWRMW extends WWR {
    private int queueType;

    private int weight;

    private int policyWeight;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    WWRMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    WWRMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static class WWW extends WW {
    protected static final long WRITE_TIME_OFFSET = UnsafeAccess.objectFieldOffset(WWW.class, "writeTime");

    private volatile long writeTime;

    private Node previousInWriteOrder;

    private Node nextInWriteOrder;

    WWW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    WWW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, now);
    }

    public final long getWriteTime() {
      return UnsafeAccess.UNSAFE.getLong(this, WRITE_TIME_OFFSET);
    }

    public final void setWriteTime(long writeTime) {
      UnsafeAccess.UNSAFE.putLong(this, WRITE_TIME_OFFSET, writeTime);
    }

    public final Node getPreviousInWriteOrder() {
      return previousInWriteOrder;
    }

    public final void setPreviousInWriteOrder(Node previousInWriteOrder) {
      this.previousInWriteOrder = previousInWriteOrder;
    }

    public final Node getNextInWriteOrder() {
      return nextInWriteOrder;
    }

    public final void setNextInWriteOrder(Node nextInWriteOrder) {
      this.nextInWriteOrder = nextInWriteOrder;
    }
  }

  static final class WWWMS extends WWW {
    private int queueType;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    WWWMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WWWMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class WWWMW extends WWW {
    private int queueType;

    private int weight;

    private int policyWeight;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    WWWMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    WWWMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static class WWWR extends WWW {
    WWWR(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WWWR(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final boolean casWriteTime(long expect, long update) {
      return UnsafeAccess.UNSAFE.compareAndSwapLong(this, WRITE_TIME_OFFSET, expect, update);
    }
  }

  static final class WWWRMS extends WWWR {
    private int queueType;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    WWWRMS(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
    }

    WWWRMS(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }

  static final class WWWRMW extends WWWR {
    private int queueType;

    private int weight;

    private int policyWeight;

    private Node previousInAccessOrder;

    private Node nextInAccessOrder;

    WWWRMW(K key, ReferenceQueue keyReferenceQueue, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(key, keyReferenceQueue, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    WWWRMW(Object keyReference, V value, ReferenceQueue valueReferenceQueue, int weight, long now) {
      super(keyReference, value, valueReferenceQueue, weight, now);
      this.weight = weight;
    }

    public final int getQueueType() {
      return queueType;
    }

    public final void setQueueType(int queueType) {
      this.queueType = queueType;
    }

    public final int getWeight() {
      return weight;
    }

    public final void setWeight(int weight) {
      this.weight = weight;
    }

    public final int getPolicyWeight() {
      return policyWeight;
    }

    public final void setPolicyWeight(int policyWeight) {
      this.policyWeight = policyWeight;
    }

    public final Node getPreviousInAccessOrder() {
      return previousInAccessOrder;
    }

    public final void setPreviousInAccessOrder(Node previousInAccessOrder) {
      this.previousInAccessOrder = previousInAccessOrder;
    }

    public final Node getNextInAccessOrder() {
      return nextInAccessOrder;
    }

    public final void setNextInAccessOrder(Node nextInAccessOrder) {
      this.nextInAccessOrder = nextInAccessOrder;
    }
  }
}