public class AdminCacheMemStore extends Object implements AdminCache
AdminCache
containing fixed amount of items. Rotation
is based on last update first out.<\br>
This implementation is backgrounded by AdminCacheWeakReference
and
all non locally cached items are searched from that implementation.Modifier and Type | Method and Description |
---|---|
boolean |
contains(String key)
Checked if content is in the cache.
|
<A> A |
get(String key,
Class<A> clazz)
Retrieve data from cache.
|
static AdminCacheMemStore |
getInstance() |
Date |
lastUpdated(String key)
Date when was cached data last updated.
|
void |
put(String key,
Object data)
Puts data to cache.
|
public <A> A get(String key, Class<A> clazz)
AdminCache
get
in interface AdminCache
key
- in the cacheclazz
- Cache data will be converted to requested type using
appropriate AdminCacheObjectProvider
null
if not cachedpublic void put(String key, Object data)
AdminCache
put
in interface AdminCache
key
- in the cachedata
- Cached data will be converted to raw bytes using
appropriate AdminCacheObjectProvider
public boolean contains(String key)
AdminCache
contains
in interface AdminCache
key
- in the cachepublic Date lastUpdated(String key)
AdminCache
lastUpdated
in interface AdminCache
key
- in the cacheDate
of last update or null if does not exist in cachepublic static AdminCacheMemStore getInstance()
Copyright © 2019. All rights reserved.