public interface LocalCache
Modifier and Type | Method and Description |
---|---|
<T> T |
computeIfAbsent(String key,
long timeoutMs,
Supplier<T> supplier)
Read or compute and save a value for a determined duration.
|
default <T> T |
computeIfAbsent(String key,
Supplier<T> supplier)
Default the timeout to Integer.MAX_VALUE.
|
<T> T computeIfAbsent(String key, long timeoutMs, Supplier<T> supplier)
T
- the type of data to access/cache.key
- the cache key, must be unique accross the server.timeoutMs
- the cache duration.supplier
- the value provider if the cache get does a miss.default <T> T computeIfAbsent(String key, Supplier<T> supplier)
T
- the type of data to access/cache.key
- the cache key, must be unique accross the server.supplier
- the value provider if the cache get does a miss.1.1.14-SNAPSHOT - Copyright © 2019 Talend Component Kit Documentation