Class LruCache.Builder<K,​V>

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • build

        public LruCache<K,​V> build()
        Description copied from interface: Builder
        Build the instance from this builder.
        Specified by:
        build in interface Builder<K>
        Returns:
        instance of the built type
      • config

        public LruCache.Builder<K,​V> config​(Config config)
        Load configuration of this cache from configuration.
        Parameters:
        config - configuration
        Returns:
        updated builder instance
      • capacity

        public LruCache.Builder<K,​V> capacity​(int capacity)
        Configure capacity of the cache.
        Parameters:
        capacity - maximal number of records in the cache before the oldest one is removed
        Returns:
        updated builder instance