Example usage for Java com.google.common.cache CacheBuilder fields, constructors, methods, implement or subclass
The text is from its open source code.
int | initialCapacity |
int | concurrencyLevel |
long | maximumSize |
long | maximumWeight |
Weigher | weigher |
RemovalListener | removalListener |
Ticker | ticker |
LoadingCache | build(CacheLoader super K1, V1> 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 . |
Cache | build() Builds a cache which does not automatically load values when keys are requested. |
CacheBuilder | expireAfterAccess(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. |
CacheBuilder | expireAfterWrite(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. |
CacheBuilder | from(CacheBuilderSpec spec) Constructs a new CacheBuilder instance with the settings specified in spec . |
CacheBuilder | from(String spec) Constructs a new CacheBuilder instance with the settings specified in spec . |
Class> | getClass() Returns the runtime class of this Object . |
CacheBuilder | newBuilder() Constructs a new CacheBuilder instance with default settings, including strong keys, strong values, and no automatic eviction of any kind. |
CacheBuilder | recordStats() Enable the accumulation of CacheStats during the operation of the cache. |
CacheBuilder | refreshAfterWrite(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. |
CacheBuilder | softValues() Specifies that each value (not key) stored in the cache should be wrapped in a SoftReference (by default, strong references are used). |
CacheBuilder | weakKeys() Specifies that each key (not value) stored in the cache should be wrapped in a WeakReference (by default, strong references are used). |
CacheBuilder | weakValues() Specifies that each value (not key) stored in the cache should be wrapped in a WeakReference (by default, strong references are used). |