Java com.google.common.cache CacheBuilder fields, constructors, methods, implement or subclass

Example usage for Java com.google.common.cache CacheBuilder fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.google.common.cache CacheBuilder.

The text is from its open source code.

Field

Method

LoadingCachebuild(CacheLoader loader)
Builds a cache, which either returns an already-loaded value for a given key or atomically computes or retrieves it using the supplied CacheLoader .
Cachebuild()
Builds a cache which does not automatically load values when keys are requested.
CacheBuilderexpireAfterAccess(long duration, TimeUnit unit)
Specifies that each entry should be automatically removed from the cache once a fixed duration has elapsed after the entry's creation, the most recent replacement of its value, or its last access.
CacheBuilderexpireAfterWrite(long duration, TimeUnit unit)
Specifies that each entry should be automatically removed from the cache once a fixed duration has elapsed after the entry's creation, or the most recent replacement of its value.
CacheBuilderfrom(CacheBuilderSpec spec)
Constructs a new CacheBuilder instance with the settings specified in spec .
CacheBuilderfrom(String spec)
Constructs a new CacheBuilder instance with the settings specified in spec .
ClassgetClass()
Returns the runtime class of this Object .
CacheBuildernewBuilder()
Constructs a new CacheBuilder instance with default settings, including strong keys, strong values, and no automatic eviction of any kind.
CacheBuilderrecordStats()
Enable the accumulation of CacheStats during the operation of the cache.
CacheBuilderrefreshAfterWrite(long duration, TimeUnit unit)
Specifies that active entries are eligible for automatic refresh once a fixed duration has elapsed after the entry's creation, or the most recent replacement of its value.
CacheBuildersoftValues()
Specifies that each value (not key) stored in the cache should be wrapped in a SoftReference (by default, strong references are used).
CacheBuilderweakKeys()
Specifies that each key (not value) stored in the cache should be wrapped in a WeakReference (by default, strong references are used).
CacheBuilderweakValues()
Specifies that each value (not key) stored in the cache should be wrapped in a WeakReference (by default, strong references are used).