public class LruCache<Key,Value extends CanEstimateSize> extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
LruCache.CreateAction<Key,Value>
When the entry is not present in cache, this create action is used to create one.
|
static interface |
LruCache.EvictAction<Value>
Action that is invoked when the entry is removed from the cache.
|
| Constructor and Description |
|---|
LruCache(int maxSizeEntries,
long maxSizeBytes,
LruCache.CreateAction<Key,Value> createAction,
LruCache.EvictAction<Value> onEvict) |
public LruCache(int maxSizeEntries,
long maxSizeBytes,
LruCache.CreateAction<Key,Value> createAction,
LruCache.EvictAction<Value> onEvict)
public Value borrow(Key key) throws SQLException
key - cache keySQLException - if entry creation failsCopyright © 2015 PostgreSQL Global Development Group. All rights reserved.