public class CollectionsCache<T> extends Object implements DaoCache
DaoCache
implementation based on Guava.Copyright © Enremmeta LLC 2015. All Rights Reserved.
Modifier and Type | Field and Description |
---|---|
private com.google.common.cache.LoadingCache<String,T> |
cache |
private DaoCacheLoader<T> |
loader |
private long |
ttl |
Constructor and Description |
---|
CollectionsCache(DaoCacheLoader<T> loader,
T nullValue,
long ttl,
long maxItems) |
Modifier and Type | Method and Description |
---|---|
T |
get(String key) |
Future<T> |
getAsync(String key) |
long |
getTtl() |
private final DaoCacheLoader<T> loader
private final long ttl
public CollectionsCache(DaoCacheLoader<T> loader, T nullValue, long ttl, long maxItems)