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.
  • Detail:
  • Field |
  • Constr |
  • Method
com.amazonaws.util

Class BoundedCache<K,V>



  • @ThreadSafe
    public final class BoundedCache<K,V>
    extends Object 
    A thread-safe cache implementation that returns the value for a specified key, retrieving it by either getting the stored value from the cache or using a supplied function to calculate that value and add it to the cache.

    When the cache is full, batch eviction of random values will be performed, with a default evictionBatchSize of 10.

    The user can configure the maximum size of the cache, which is set to a default of 150.

    Keys must not be null, otherwise an error will be thrown. Null values are not cached.

    • Method Detail

      • get

        public V get(K key)
        Get a value based on the key. The key must not be null, otherwise an error is thrown. If the value exists in the cache, it's returned. Otherwise, the value is calculated based on the supplied function BoundedCache.Builder.mappingFunction(Function).
Skip navigation links
  • Detail:
  • Field |
  • Constr |
  • Method

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