Interface NodeFactory<K,V>

All Known Implementing Classes:
FD, FDA, FDAMS, FDAMW, FDAR, FDARMS, FDARMW, FDAW, FDAWMS, FDAWMW, FDAWR, FDAWRMS, FDAWRMW, FDMS, FDMW, FDR, FDRMS, FDRMW, FDW, FDWMS, FDWMW, FDWR, FDWRMS, FDWRMW, FS, FSA, FSAMS, FSAMW, FSAR, FSARMS, FSARMW, FSAW, FSAWMS, FSAWMW, FSAWR, FSAWRMS, FSAWRMW, FSMS, FSMW, FSR, FSRMS, FSRMW, FSW, FSWMS, FSWMW, FSWR, FSWRMS, FSWRMW, FW, FWA, FWAMS, FWAMW, FWAR, FWARMS, FWARMW, FWAW, FWAWMS, FWAWMW, FWAWR, FWAWRMS, FWAWRMW, FWMS, FWMW, FWR, FWRMS, FWRMW, FWW, FWWMS, FWWMW, FWWR, FWWRMS, FWWRMW, PD, PDA, PDAMS, PDAMW, PDAR, PDARMS, PDARMW, PDAW, PDAWMS, PDAWMW, PDAWR, PDAWRMS, PDAWRMW, PDMS, PDMW, PDR, PDRMS, PDRMW, PDW, PDWMS, PDWMW, PDWR, PDWRMS, PDWRMW, PS, PSA, PSAMS, PSAMW, PSAR, PSARMS, PSARMW, PSAW, PSAWMS, PSAWMW, PSAWR, PSAWRMS, PSAWRMW, PSMS, PSMW, PSR, PSRMS, PSRMW, PSW, PSWMS, PSWMW, PSWR, PSWRMS, PSWRMW, PW, PWA, PWAMS, PWAMW, PWAR, PWARMS, PWARMW, PWAW, PWAWMS, PWAWMW, PWAWR, PWAWRMS, PWAWRMW, PWMS, PWMW, PWR, PWRMS, PWRMW, PWW, PWWMS, PWWMW, PWWR, PWWRMS, PWWRMW

interface NodeFactory<K,V>
WARNING: GENERATED CODE A factory for cache nodes optimized for a particular configuration.
  • Field Details

  • Method Details

    • newNode

      Node<K,V> newNode(K key, ReferenceQueue<K> keyReferenceQueue, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now)
      Returns a node optimized for the specified features.
    • newNode

      Node<K,V> newNode(Object keyReference, V value, ReferenceQueue<V> valueReferenceQueue, int weight, long now)
      Returns a node optimized for the specified features.
    • newReferenceKey

      default Object newReferenceKey(K key, ReferenceQueue<K> referenceQueue)
      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 References.WeakKeyReference<K> holding the key argument is returned.
    • newLookupKey

      default Object newLookupKey(Object key)
      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 References.LookupKeyReference holding the key argument is returned.
    • newFactory

      static <K, V> NodeFactory<K,V> newFactory(Caffeine<K,V> builder, boolean isAsync)
      Returns a factory optimized for the specified features.
    • weakValues

      default boolean weakValues()
      Returns whether this factory supports weak values.
    • softValues

      default boolean softValues()
      Returns whether this factory supports soft values.