JavaScript is disabled on your browser.
Skip navigation links

AWS SDK for Java 1.x API Reference - 1.12.795

We announced the upcoming end-of-support for AWS SDK for Java (v1). We recommend that you migrate to AWS SDK for Java v2. For dates, additional details, and information on how to migrate, please refer to the linked announcement.
com.amazonaws.internal

Class FIFOCache<T>

  • Type Parameters:
    T - value type


    @ThreadSafe
    public final class FIFOCache<T>
    extends Object 
    A bounded cache that has a FIFO eviction policy when the cache is full.
    • Constructor Summary

      Constructors
      Constructor and Description
      FIFOCache (int maxSize)
    • Constructor Detail

      • FIFOCache

        public FIFOCache(int maxSize)
        Parameters:
        maxSize - the maximum number of entries of the cache
    • Method Detail

      • add

        public T add(String key,
         T value)
        Adds an entry to the cache, evicting the earliest entry if necessary.
      • get

        public T get(String key)
        Returns the value of the given key; or null of no such entry exists.
      • size

        public int size()
        Returns the current size of the cache.
      • getMaxSize

        public int getMaxSize()
        Returns the maximum size of the cache.
Skip navigation links

AltStyle によって変換されたページ (->オリジナル) /